/* AEVON · piezas comunes de las páginas del área cliente (las que se abren dentro de la aplicación). Los colores, radios y sombras
   salen de aevon-ui.css y aevon-tema.js; aquí van la maqueta y los componentes: cabecera, tarjetas, botones, formularios, listas, diálogos. */
body { margin: 0; background: var(--bg, #f5f6f8); color: var(--ink, #050505); font: 13.5px/1.45 "Source Sans 3", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
main { max-width: 1400px; margin: auto; padding: 20px clamp(12px, 2.2vw, 24px) 72px; animation: pg-in .3s var(--ease, ease) both; }
main.narrow { max-width: 880px; }
h1 { font: 600 20px/1.2 Archivo, sans-serif; margin: 0; }
h2 { font: 600 14.5px/1.3 Archivo, sans-serif; margin: 0 0 10px; }
h3 { font: 600 12px "Source Sans 3", sans-serif; letter-spacing:0;  color: var(--secondary, #505050); margin: 0 0 8px}
p { margin: 0; } a { color: inherit; }
.sub { color: var(--secondary, #505050); margin: 4px 0 0; max-width: 72ch; font-size: 13.5px; }
.hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .sp { margin-left: auto; } .muted { color: var(--secondary, #505050); } .small { font-size: 12.5px; }
.panel { background: var(--white, #fff); border: 1px solid var(--line, #05050517); border-radius: var(--r, 16px); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.tray { background: #05050510; border-radius: 14px; padding: 4px; min-width: 0; } html[data-aw-theme="dark"] .tray { background: #ffffff12; }
.tray > .card { background: var(--white, #fff); border: 1px solid var(--line, #05050517); border-radius: 10px; padding: 12px 14px; }
.tray > .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px 8px; color: var(--secondary, #505050); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 12px; align-items: start; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.btn { min-height: 36px; padding: 0 12px; border: 1px solid var(--line, #05050517); border-radius: var(--r-s, 10px); background: var(--white, #fff); cursor: pointer; font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn.pri { background: var(--ink, #050505); color: var(--bg, #fff); border-color: var(--ink, #050505); } .btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; } .btn.ghost { border-color: transparent; background: none; } .btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line, #05050517); } .seg button { border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--secondary, #505050); } .seg button[aria-pressed=true] { background: var(--ink, #050505); color: var(--bg, #fff); }
.field, .hd select, .hd input[type=search] { min-height: 36px; padding: 0 10px; border: 1px solid var(--line, #05050517); border-radius: var(--r-s, 10px); background: var(--white, #fff); min-width: 0; }
label.f { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--secondary, #505050); min-width: 0; }
label.f input, label.f select, label.f textarea { width: 100%; box-sizing: border-box; min-height: 36px; padding: 6px 10px; border: 1px solid var(--control-border, #05050538); background: var(--white, #fff); font-size: 14px; font-weight: 400; color: var(--ink, #050505); }
label.f.full { grid-column: 1 / -1; } label.c { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; } label.c input { margin-top: 3px; flex: none; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tag { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; background: #05050510; color: var(--secondary, #505050); } html[data-aw-theme="dark"] .tag { background: #ffffff1a; color: var(--ink); }
.tag.ok { background: #dff5e6; color: #17693a; } .tag.warn { background: #fdf0dc; color: #8a5a12; } .tag.bad { background: #fde3e3; color: #a1261e; } .tag.blue { background: #e3ebff; color: #1f47b5; }
.list > * { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line, #05050517); min-width: 0; } .list > *:last-child { border-bottom: 0; }
.list .t { flex: 1; min-width: 0; } .list .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .list .t small { display: block; color: var(--secondary, #505050); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.rowbtn { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 0; }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; } .kv > * { background: var(--white, #fff); border: 1px solid var(--line, #05050517); border-radius: var(--r, 16px); box-shadow: var(--shadow); padding: 12px 14px; text-align: left; min-width: 0; }
.kv small { display: block; color: var(--secondary, #505050); font-size: 12.5px; } .kv b { display: block; font: 600 22px/1.2 Archivo, sans-serif; margin-top: 2px; font-variant-numeric: tabular-nums; } .kv b.bad { color: #b3261e; } button.kvb { cursor: pointer; transition: transform .15s, border-color .15s; } button.kvb:hover { border-color: var(--ink, #050505); transform: translateY(-1px); }
.ring { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ink, #050505) var(--p, 0%), #05050518 0); } html[data-aw-theme="dark"] .ring { background: conic-gradient(var(--ink) var(--p, 0%), #ffffff24 0); }
.ring > span { width: 36px; height: 36px; border-radius: 50%; background: var(--white, #fff); display: grid; place-items: center; font: 600 14px Archivo, sans-serif; }
.meter { height: 6px; background: #05050512; overflow: hidden; } html[data-aw-theme="dark"] .meter { background: #ffffff1c; } .meter i { display: block; height: 100%; background: var(--ink, #050505); width: 0; transition: width .6s var(--ease, ease); }
.avs { display: flex; flex: none; } .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 10.5px "Source Sans 3", sans-serif; border: 2px solid var(--white, #fff); margin-left: -8px; color: #050505; flex: none; } .avs .av:first-child, .av.solo { margin-left: 0; }
.chk { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #05050538; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; transition: background .2s, border-color .2s, transform .15s; } html[data-aw-theme="dark"] .chk { border-color: #ffffff50; }
.chk:active { transform: scale(.85); } .chk.on { background: var(--ink, #050505); border-color: var(--ink, #050505); } .chk svg { opacity: 0; stroke: var(--bg, #fff); transition: opacity .2s; } .chk.on svg { opacity: 1; } .chk:disabled { opacity: .55; cursor: default; }
table.t { width: 100%; border-collapse: collapse; } table.t th, table.t td { text-align: left; padding: 8px 14px; border-bottom: 1px solid var(--line, #05050517); vertical-align: middle; } table.t th { font-size: 11px; letter-spacing:0;  color: var(--secondary, #505050); font-weight: 600; background: var(--bg, #f5f6f8)}
table.t tbody tr:last-child td { border-bottom: 0; } table.t tbody tr[data-id] { cursor: pointer; transition: background .15s; } table.t tbody tr[data-id]:hover { background: var(--bg, #f5f6f8); } .scroll { overflow-x: auto; }
dialog { margin: auto; padding: 0; border: 1px solid var(--line, #05050517); width: min(620px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); background: var(--white, #fff); color: var(--ink, #050505); } dialog.wide { width: min(860px, calc(100vw - 20px)); }
dialog::backdrop { background: #05050566; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); } dialog[open] { animation: pg-pop .26s var(--ease, ease); }
dialog form, dialog .dbody { padding: 20px; display: grid; gap: 12px; } dialog h2 { margin: 0; font-size: 17px; }
.note { padding: 12px 14px; background: #fdf0dc; color: #6b4410; border: 1px solid #f0d7a8; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; } .note.info { background: #e8eeff; border-color: #c9d7ff; color: #1f3c8f; }
.empty { text-align: center; padding: 7vh 20px; } .empty h2 { font-size: 22px; margin-bottom: 6px; } .empty p { color: var(--secondary, #505050); margin: 0 auto 16px; max-width: 46ch; }
.drop { border: 2px dashed var(--control-border, #05050538); padding: 28px 20px; text-align: center; cursor: pointer; background: var(--bg, #f5f6f8); display: block; } .drop.over { border-color: var(--blue, #548cff); background: var(--blue-wash, #e8eeff); } .drop b { display: block; font: 600 16px Archivo, sans-serif; } .drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink, #050505); color: var(--bg, #fff); padding: 10px 16px; z-index: 99; max-width: calc(100vw - 32px); animation: pg-in .25s both; }
.err { color: #b3261e; }
@keyframes pg-in { from { opacity: 0; transform: translateY(10px); } } @keyframes pg-pop { from { opacity: 0; transform: scale(.95) translateY(12px); } }
@media (max-width: 860px) { .cols2 { grid-template-columns: minmax(0, 1fr); } .kv { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .g2 { grid-template-columns: 1fr; } .hd { align-items: stretch; } .hd .btn.pri { flex: 1; } table.t .hide-m { display: none; } table.t th, table.t td { padding: 12px 12px; } }
