/* =====================================================================
   The Arabic Corner — hoja de estilos
   Paleta: ónix, arena y dorado neutro.
   Tipografía: Cinzel (marca y rótulos) · Cormorant Garamond (títulos) · Jost (texto)
   Formas: esquinas rectas, filetes dorados finos y marcos en arco para los productos.
   ===================================================================== */
:root {
  --ink: #16130F;
  --ink-700: #0E0C09;
  --ink-900: #0B0907;
  --ink-soft: #F1E8D8;
  --ink-line: #D6C6A8;
  --ink-mute: #A8977A;
  --bg: #F6F1E8;
  --card: #FFFDF9;
  --panel: #F1EADD;
  --field: #FCFAF6;
  --cream: #EFE6D6;
  --line: #E6DCCB;
  --hair: rgba(201, 169, 97, .5);
  --text: #1B1712;
  --muted: #776C5D;
  --green: #2F6B45;
  --green-soft: #E2EEE2;
  --amber: #9A5A22;
  --amber-soft: #F6E8D3;
  --red: #A83A32;
  --red-soft: #F6E2DD;
  --blue-soft: #E2EAEE;
  --blue: #3F6578;
  --gold: #C9A961;
  --gold-ink: #85662C;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(30, 24, 15, .04);
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Futura', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 14.5px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: 0; margin: 0; line-height: 1.12; }
h1 { font-size: 40px; font-weight: 500; }
h2 { font-size: 25px; }
h3 { font-size: 20px; }
p { margin: 0; }
a { color: var(--gold-ink); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.eyebrow { font-family: var(--display); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.eyebrow.gold { color: var(--gold-ink); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Rótulo de sección con filetes dorados a los lados */
.rule-title { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-ink); }
.rule-title::before, .rule-title::after { content: ''; flex: 1; height: 1px; background: var(--hair); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 2px; padding: 11px 20px;
  font-weight: 500; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; background: none; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap; text-decoration: none !important;
}
.btn-primary { background: var(--ink); color: #F6EEDC; }
.btn-primary:hover { background: #2A241C; }
.btn-outline { border-color: var(--ink-line); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); background: var(--card); }
.btn-ghost { color: var(--gold-ink); padding: 6px 4px; letter-spacing: .12em; }
.btn-ghost:hover { color: var(--ink); }
.btn-danger { border-color: #E2B9B3; color: var(--red); background: transparent; }
.btn-danger:hover { background: var(--red-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 11px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 2px; border: 1px solid var(--line); background: var(--card);
  display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; transition: border-color .15s;
}
.icon-btn:hover { border-color: var(--gold); }
.icon-btn.danger { color: var(--red); }
.icon-btn.plain { border: none; background: none; }
.icon-btn.plain:hover { color: var(--gold-ink); }
svg.i { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field > label, .label { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: var(--field); border-radius: 2px;
  padding: 11px 12px; outline: none; transition: border .15s, box-shadow .15s;
}
select.input { background: var(--card); cursor: pointer; }
textarea.input { resize: vertical; min-height: 70px; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 169, 97, .2); }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 0; font-size: 14px; }
.check input { accent-color: var(--ink); width: 15px; height: 15px; margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.checks-inline { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.form-error { background: var(--red-soft); color: var(--red); padding: 10px 12px; border-left: 2px solid var(--red); font-size: 13px; margin-bottom: 14px; }

/* ---------- chips / pills ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 2px; background: var(--cream); font-size: 11.5px; font-weight: 500; letter-spacing: .03em; }
.chip.ink { background: var(--ink); color: #F1E5C9; }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.red { background: var(--red-soft); color: #9B3030; }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.white { background: var(--card); border: 1px solid var(--line); }
.pill {
  border: 1px solid var(--line); background: var(--card); border-radius: 2px; padding: 8px 15px; cursor: pointer;
  font-weight: 400; font-size: 13.5px; transition: .15s;
}
.pill:hover { border-color: var(--gold); }
.pill.active { background: var(--ink); color: #F6EEDC; border-color: var(--ink); }

/* Pestañas subrayadas (familias del catálogo) */
.tabs { display: flex; gap: 26px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: none; padding: 12px 0 13px; cursor: pointer; font-family: var(--display); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); white-space: nowrap; position: relative; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold); }

/* ---------- tarjetas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head p { margin-top: 8px; color: var(--muted); }
.page-head h1::before { content: ''; display: block; width: 34px; height: 1px; background: var(--gold); margin-bottom: 14px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

/* ---------- logotipo ---------- */
.lockup { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none !important; }
.lockup .emblem { width: 30px; height: 38px; color: var(--gold); flex: none; }
.lockup .wm { display: flex; flex-direction: column; align-items: center; line-height: 1; font-family: var(--display); }
.lockup .wm-the { font-size: 9px; letter-spacing: .5em; margin-right: -.5em; color: var(--gold-ink); }
.lockup .wm-main { font-size: 21px; font-weight: 600; letter-spacing: .1em; margin: 2px 0 2px; background: linear-gradient(180deg, #D9BE7E, #9C7B3C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lockup .wm-sub { font-size: 9.5px; letter-spacing: .62em; margin-right: -.62em; color: var(--gold-ink); }
.lockup.on-dark .wm-the, .lockup.on-dark .wm-sub { color: #D8C08A; }

/* ---------- cabecera del cliente (logo centrado, menú partido) ---------- */
.masthead { position: sticky; top: 0; z-index: 20; background: rgba(255, 253, 249, .97); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.masthead::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--hair); opacity: .6; }
.mh-inner { max-width: 1280px; margin: 0 auto; height: 76px; padding: 0 32px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.mh-nav { display: flex; gap: 28px; }
.mh-nav.right { justify-content: flex-end; align-items: center; }
.mh-nav a { font-family: var(--display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text); text-decoration: none; padding: 6px 0; position: relative; white-space: nowrap; }
.mh-nav a:hover { color: var(--gold-ink); }
.mh-nav a.active::after { content: ''; position: absolute; left: 50%; bottom: -2px; width: 18px; margin-left: -9px; height: 1px; background: var(--gold); }
.mh-tools { display: flex; align-items: center; gap: 8px; margin-left: 12px; padding-left: 18px; border-left: 1px solid var(--line); }
.menu-toggle { display: none; }
.mobile-nav { display: none; }
.user-mini { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center;
  font-family: var(--display); font-size: 12px; letter-spacing: .05em; flex: none;
}
.avatar.lg { width: 82px; height: 82px; font-size: 26px; box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--gold); }
.avatar.gold { background: #E3CD9B; color: var(--ink); }
a.avatar { color: var(--gold); text-decoration: none !important; }
.logout { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; padding: 4px; }
.logout:hover { color: var(--ink); }
.main { max-width: 1280px; margin: 0 auto; padding: 38px 32px 70px; }
.cmp-badge { background: var(--gold); color: var(--ink); font-family: var(--sans); font-size: 10px; letter-spacing: 0; border-radius: 999px; padding: 1px 6px; margin-left: 5px; vertical-align: 1px; }

/* ---------- barra lateral (asesor / admin) ---------- */
.shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink-900); color: #E9E1D3; padding: 28px 18px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; border-right: 1px solid rgba(201, 169, 97, .25); }
.sidebar .lockup { color: #fff; justify-content: center; padding-bottom: 20px; border-bottom: 1px solid rgba(201, 169, 97, .22); }
.sidebar .role { font-family: var(--display); font-size: 10px; letter-spacing: .26em; color: var(--gold); margin: 18px 10px 14px; text-transform: uppercase; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: #D9D0C1; font-size: 13.5px; text-decoration: none; border-left: 1px solid transparent; }
.sidebar nav a:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.sidebar nav a.active { color: #F3E9D4; border-left-color: var(--gold); background: linear-gradient(90deg, rgba(201, 169, 97, .14), transparent); }
.sidebar nav a.active svg { color: var(--gold); }
.sidebar .me { margin-top: auto; border-top: 1px solid rgba(201, 169, 97, .22); padding: 16px 8px 0; }
.sidebar .me .n { font-weight: 500; color: #fff; font-size: 13px; }
.sidebar .me .s { font-size: 11.5px; color: #A89B86; }
.sidebar .logout { color: var(--gold); padding: 12px 0 0; }
.shell-main { padding: 36px 40px 70px; min-width: 0; }

/* ---------- inicio de sesión ---------- */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-side { background: #080604; color: #EFE7D8; padding: 40px 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.auth-side::before { content: ''; position: absolute; inset: 22px; border: 1px solid rgba(201, 169, 97, .22); pointer-events: none; }
.auth-logo { width: min(78%, 470px); aspect-ratio: 1; object-fit: cover; mix-blend-mode: lighten; }
.auth-side .lead { font-size: 15px; line-height: 1.7; color: #CFC4B0; max-width: 420px; text-align: center; margin-top: 4px; }
.auth-side .feats { display: flex; gap: 26px; margin-top: 26px; font-family: var(--display); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); flex-wrap: wrap; justify-content: center; }
.auth-side .feats span { display: inline-flex; align-items: center; gap: 8px; }
.auth-main { display: grid; place-items: center; padding: 48px 28px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .eyebrow { color: var(--gold-ink); }
.auth-card h2 { font-size: 40px; font-weight: 500; margin: 8px 0 6px; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); margin-bottom: 22px; background: var(--card); }
.role-opt { border: none; border-right: 1px solid var(--line); padding: 12px 10px; text-align: center; background: none; cursor: pointer; position: relative; }
.role-opt:last-child { border-right: none; }
.role-opt b { display: block; font-family: var(--display); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; margin-bottom: 3px; }
.role-opt span { font-size: 11px; color: var(--muted); line-height: 1.3; display: block; }
.role-opt.active { background: var(--ink); color: #F6EEDC; }
.role-opt.active span { color: #C9BBA0; }
.demo-box { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.demo-box code { color: var(--ink); font-size: 11.5px; }

/* ---------- catálogo ---------- */
.cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.cat-head h1 { font-size: 46px; }
.cat-head p { color: var(--muted); margin-top: 6px; }
.toolbar { display: flex; gap: 10px; align-items: center; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 38px; background: var(--card); min-width: 260px; }
.filterbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.fb-label { font-family: var(--display); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); padding: 8px 12px; border-radius: 2px; cursor: pointer; font-size: 13px; }
.dd-btn:hover, .dd.open .dd-btn { border-color: var(--ink); }
.dd-btn .count { background: var(--ink); color: var(--gold); font-size: 10px; border-radius: 999px; padding: 0 6px; }
.dd-btn::after { content: ''; width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.dd-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 15; min-width: 220px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 32px rgba(30, 24, 15, .12); padding: 14px 16px; display: none; }
.dd.open .dd-panel { display: block; }
.dd-panel .range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dd-panel .range label { font-size: 11px; color: var(--muted); }
.dd-panel .presets { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.dd-panel .presets button { text-align: left; background: none; border: none; padding: 5px 0; cursor: pointer; font-size: 13px; color: var(--gold-ink); }
.fb-clear { margin-left: auto; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 34px 22px; }

/* Tarjeta de producto: marco en arco con proporción fija para todas las fotos */
.pcard { display: flex; flex-direction: column; text-align: center; position: relative; }
.pcard .ph { position: relative; aspect-ratio: 4 / 5; border-radius: 50% 50% 3px 3px / 40% 40% 3px 3px; background: var(--panel); display: grid; place-items: center; overflow: hidden; border: 1px solid transparent; transition: border-color .2s; }
.pcard:hover .ph { border-color: var(--hair); }
.pcard .ph .chip { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 1; background: rgba(255, 253, 249, .9); font-family: var(--display); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; }
.pcard .fav { position: absolute; top: 18%; right: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.pcard .fav.on svg { fill: #B8913F; stroke: #B8913F; }
.pcard .match-tag { position: absolute; top: 18%; left: 10px; z-index: 2; background: var(--ink); color: var(--gold); font-weight: 500; font-size: 11px; border-radius: 999px; padding: 4px 9px; }
.pcard .agotado { position: absolute; top: 18%; left: 10px; z-index: 2; }
.pcard .body { padding: 14px 6px 0; display: flex; flex-direction: column; flex: 1; align-items: center; }
.pcard .brandname { font-family: var(--display); font-size: 10px; letter-spacing: .22em; color: var(--gold-ink); text-transform: uppercase; }
.pcard h3 { font-size: 22px; margin: 5px 0 3px; font-weight: 600; min-height: 2.24em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; align-content: center; }
.pcard h3 a { color: inherit; text-decoration: none; }
.pcard .conc { font-size: 12px; color: var(--muted); }
.pcard .price { font-size: 15px; font-weight: 500; margin: 8px 0 12px; letter-spacing: .02em; }
.pcard .actions { display: flex; gap: 6px; justify-content: center; margin-top: auto; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* Imagen de producto (foto real o frasco ilustrado) con tamaño uniforme */
.big, .th, .ph, .thumb-cell { position: relative; overflow: hidden; }
.pimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 12%; display: block; }
.ph .pimg { padding: 16% 13% 15%; }
.big .pimg { padding: 13%; }
.th .pimg, .thumb-cell .pimg { padding: 8%; }

/* ---------- detalle ---------- */
.crumbs { font-size: 11px; font-family: var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; display: flex; gap: 10px; }
.crumbs a { font-weight: 400; }
.detail { display: grid; grid-template-columns: minmax(0, 430px) 1fr; gap: 64px; align-items: start; }
.gallery .big { aspect-ratio: 4 / 5; border-radius: 50% 50% 4px 4px / 40% 40% 4px 4px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--hair); }
.credit { font-size: 11px; color: var(--muted); margin-top: 10px; text-align: center; }
.credit a { color: var(--muted); font-weight: 400; text-decoration: underline; }
.detail h1 { font-size: 52px; margin: 6px 0 12px; }
.price-row { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.price-row .p { font-size: 24px; font-weight: 500; }
.attrs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: 20px 0 22px; }
.attr { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); padding: 12px 14px; }
.attr .eyebrow { font-size: 9.5px; margin-bottom: 5px; }
.attr b { font-size: 14px; font-weight: 500; }
.meter { height: 3px; border-radius: 0; background: #E9E0D0; overflow: hidden; margin: 7px 0; }
.meter > i { display: block; height: 100%; background: var(--ink); }
.meter.soft > i { background: #B5A27E; }
.meter.green > i { background: var(--green); }
.meter.amber > i { background: var(--amber); }
.meter.gray > i { background: #8C8172; }
.meter.lg { height: 4px; }
.det-bottom { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; margin-top: 40px; }

/* Pirámide olfativa: tres franjas que se ensanchan hacia la base */
.pyramid { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 2px; }
.pyramid .tier { text-align: center; background: var(--panel); padding: 13px 18px; border-top: 1px solid var(--hair); }
.pyramid .tier:nth-child(1) { width: 56%; }
.pyramid .tier:nth-child(2) { width: 78%; }
.pyramid .tier:nth-child(3) { width: 100%; }
.pyramid .eyebrow { color: var(--gold-ink); font-size: 9.5px; }
.pyramid b { display: block; font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 4px 0 2px; }
.pyramid .muted { font-size: 11.5px; }
.match-card { background: var(--ink); color: #fff; padding: 26px; border: 1px solid rgba(201, 169, 97, .45); position: relative; }
.match-card::before { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(201, 169, 97, .18); pointer-events: none; }
.match-card .big { font-family: var(--serif); font-size: 52px; font-weight: 500; color: var(--gold); }
.match-card ul { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: #E6DCCB; }
.match-card a { color: var(--gold); font-size: 12.5px; position: relative; }
.similar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mini { display: flex; align-items: center; gap: 14px; padding: 12px; cursor: pointer; }
.mini:hover { border-color: var(--hair); }
.mini .th { width: 52px; height: 64px; border-radius: 50% 50% 2px 2px / 40% 40% 2px 2px; display: grid; place-items: center; flex: none; }
.mini b { display: block; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.pct-green { color: var(--green); font-weight: 500; font-size: 12px; }

/* ---------- buscador ---------- */
.finder { display: grid; grid-template-columns: 1fr 1.3fr; gap: 26px; align-items: start; }
.q { padding: 16px 0; border-bottom: 1px solid var(--line); }
.q:last-child { border: none; }
.q .qh { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.q .num { position: relative; width: 28px; height: 28px; color: var(--gold-ink); display: grid; place-items: center; font-family: var(--display); font-size: 11px; flex: none; }
.q .num::before { content: ''; position: absolute; inset: 4px; border: 1px solid var(--gold); transform: rotate(45deg); }
.q .qh b { font-family: var(--serif); font-size: 19px; font-weight: 600; flex: 1; }
.q .peso { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.q .pills { display: flex; flex-wrap: wrap; gap: 7px; }
.result { display: grid; grid-template-columns: 30px 60px 1fr 150px auto; gap: 16px; align-items: center; padding: 14px 18px; margin-bottom: 10px; }
.result .rank { font-family: var(--serif); font-size: 26px; color: var(--gold-ink); text-align: center; }
.result .th { width: 58px; height: 72px; border-radius: 50% 50% 2px 2px / 40% 40% 2px 2px; display: grid; place-items: center; }
.result h3 { font-size: 21px; display: inline; margin-right: 8px; }
.result .meta { font-size: 12px; color: var(--muted); }
.result .ok { color: var(--green); font-size: 12px; margin-top: 4px; }
.result .no { color: var(--muted); font-size: 12px; margin-top: 2px; }
.result .pct { font-family: var(--serif); font-size: 30px; text-align: right; }
.hint { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- comparador ---------- */
.cmp { overflow-x: auto; padding: 0; }
.cmp table { width: 100%; border-collapse: collapse; min-width: 760px; }
.cmp th, .cmp td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13.5px; vertical-align: middle; }
.cmp td + td, .cmp th + th { border-left: 1px solid var(--line); }
.cmp .lab { font-family: var(--display); font-weight: 500; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; width: 170px; color: var(--muted); }
.cmp .headcell { text-align: center; position: relative; padding: 22px 16px; }
.cmp .headcell .th { width: 96px; height: 120px; border-radius: 50% 50% 2px 2px / 40% 40% 2px 2px; margin: 12px auto; display: grid; place-items: center; }
.cmp .headcell h3 { font-size: 22px; margin: 4px 0; }
.cmp .headcell .x { position: absolute; top: 10px; right: 10px; }
.cmp .best { background: #FBF6EC; }
.cmp .best-tag { background: var(--ink); color: var(--gold); font-family: var(--display); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; padding: 4px 10px; display: inline-block; }
.bar-cell { display: flex; align-items: center; gap: 12px; }
.bar-cell .meter { flex: 1; margin: 0; }
.bar-cell b { font-size: 12px; font-weight: 500; min-width: 70px; text-align: right; }
.add-slot { display: grid; place-items: center; min-height: 220px; border: 1px dashed var(--ink-line); color: var(--gold-ink); cursor: pointer; background: none; width: 100%; font-family: var(--display); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }

/* ---------- perfil ---------- */
.profile { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.pcenter { text-align: center; }
.pcenter .avatar { margin: 0 auto 14px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv:last-child { border: none; }
.kv span { color: var(--muted); }
.kv b { text-align: right; font-weight: 500; }
.bars .b { margin-bottom: 10px; }
.bars .b .row { justify-content: space-between; font-size: 13px; }
.bars .b .row b { font-weight: 500; }
.favs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.fcard { overflow: hidden; cursor: pointer; text-align: center; border: none; background: none; box-shadow: none; }
.fcard .ph { aspect-ratio: 4 / 5; border-radius: 50% 50% 2px 2px / 40% 40% 2px 2px; display: grid; place-items: center; }
.fcard .body { padding: 10px 4px; }
.fcard b { font-family: var(--serif); font-weight: 600; font-size: 18px; display: block; }

/* ---------- tablas ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { background: transparent; border-bottom: 1px solid var(--ink); font-family: var(--display); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; text-align: left; padding: 12px 14px; white-space: nowrap; }
table.t td { padding: 11px 14px; border-top: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
table.t tr.sel td { background: #FBF6EC; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #FBF8F2; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.pos { color: var(--green); font-weight: 500; }
.neg { color: var(--red); font-weight: 500; }

/* ---------- asesor ---------- */
.two { display: grid; grid-template-columns: 1fr 1.25fr; gap: 22px; align-items: start; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); margin: 16px 0; }
.stats3 > div { padding: 12px 14px; border-right: 1px solid var(--line); }
.stats3 > div:last-child { border-right: none; }
.stats3 b { font-family: var(--serif); font-size: 24px; display: block; font-weight: 600; }
.stats3 span { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.rec { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); padding: 12px; margin-bottom: 10px; background: var(--card); }
.rec .th { width: 50px; height: 62px; border-radius: 50% 50% 2px 2px / 40% 40% 2px 2px; display: grid; place-items: center; flex: none; }
.rec .pct { font-family: var(--serif); font-size: 26px; color: var(--green); margin-left: auto; }
.timeline { position: relative; padding-left: 24px; }
.timeline .ev { position: relative; padding-bottom: 18px; }
.timeline .ev::before { content: ''; position: absolute; left: -20px; top: 5px; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.timeline .ev::after { content: ''; position: absolute; left: -17px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline .ev:last-child::after { display: none; }
.timeline .when { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.timeline b { display: block; font-size: 14px; font-weight: 500; margin: 2px 0; }
.timeline p { font-size: 13px; color: #4B4237; }
.client-list .cl { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.client-list .cl:hover { background: #FBF8F2; }
.client-list .cl.active { background: var(--ink-soft); }
.search-drop { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; margin-top: 6px; max-height: 320px; overflow: auto; }
.active-client { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--hair); border-left: 3px solid var(--gold); padding: 9px 14px; font-size: 13.5px; }

/* ---------- admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--card); margin-bottom: 22px; }
.kpis .kpi { border: none; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; background: none; }
.kpis .kpi:last-child { border-right: none; }
.kpi { padding: 18px 22px; }
.kpi .v { font-family: var(--serif); font-size: 42px; font-weight: 500; margin: 4px 0 2px; }
.kpi .d { font-size: 12px; }
.dash { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; }
.hbar { margin-bottom: 15px; cursor: pointer; }
.hbar .row { justify-content: space-between; font-size: 13.5px; }
.hbar .row b { font-weight: 500; }
.hbar:hover b { color: var(--gold-ink); }
.hbar .meter { height: 4px; margin-top: 8px; }
.hbar .meter > i { background: var(--gold); }
.oc-row { display: grid; grid-template-columns: 110px 1fr 40px; gap: 12px; align-items: center; margin-bottom: 12px; font-size: 13.5px; }
.oc-row .meter { height: 14px; margin: 0; background: var(--panel); }
.oc-row .meter > i { background: var(--ink); }
.oc-row b { text-align: right; font-size: 12.5px; font-weight: 500; }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; display: inline-block; }
.admin-perf { display: grid; grid-template-columns: 1fr 390px; gap: 20px; align-items: start; }
.editor { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; }
.upload { border: 1px dashed var(--ink-line); padding: 16px; text-align: center; cursor: pointer; margin-bottom: 12px; display: flex; align-items: center; gap: 14px; justify-content: center; }
.upload:hover { border-color: var(--gold); }
.upload img { width: 60px; height: 72px; object-fit: contain; background: var(--panel); }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 20px; }
.cat-item { display: flex; align-items: center; gap: 11px; padding: 11px 18px; border-top: 1px solid var(--line); }
.cat-item .n { flex: 1; min-width: 0; }
.cat-item b { font-size: 14px; font-weight: 500; display: block; }
.cat-item .count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.newcat { display: grid; grid-template-columns: 1fr 1fr 1.4fr 110px auto; gap: 12px; align-items: end; }
.newcat .field { margin: 0; }
input[type=color].input { padding: 4px; height: 44px; cursor: pointer; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(11, 9, 7, .58); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 2px; border-top: 2px solid var(--gold); width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 26px 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.modal.wide { max-width: 740px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
#toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--ink-900); color: #F3E9D4; padding: 12px 16px; border-left: 2px solid var(--gold); font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: up .2s; max-width: 340px; }
.toast.err { background: var(--red); border-left-color: #fff; color: #fff; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.spinner { width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 70px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.terms-text { font-size: 13.5px; line-height: 1.65; color: #3D352B; }
.terms-text h4 { margin: 14px 0 4px; font-size: 14px; font-weight: 500; }

/* ---------- alertas ---------- */
.bell { position: relative; }
.bell-side { position: relative; background: none; border: none; color: var(--gold); cursor: pointer; padding: 2px; display: inline-grid; }
.bell-badge { position: absolute; top: -5px; right: -6px; background: var(--red); color: #fff; font-size: 10px; font-weight: 600; min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }
.alerta { border: 1px solid var(--line); border-left: 3px solid var(--blue); padding: 12px 14px; margin-bottom: 10px; background: var(--card); }
.alerta.alta { border-left-color: var(--red); }
.alerta.media { border-left-color: var(--amber); }
.alerta b { display: block; margin: 6px 0 3px; font-size: 14px; font-weight: 500; }
.alerta p { font-size: 13px; color: #4B4237; line-height: 1.5; margin-bottom: 4px; }
.alertas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.alertas-grid .alerta { margin: 0; }

/* ---------- pesos (what-if) ---------- */
.pesos { margin-top: 14px; }
.peso-row { display: grid; grid-template-columns: 120px 1fr 44px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13.5px; }
.peso-row b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--ink); }
.mov { font-size: 11px; font-weight: 600; margin-left: 6px; font-family: var(--sans); }
.mov.up { color: var(--green); }
.mov.down { color: var(--red); }

/* ---------- análisis admin ---------- */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--card); }
.kv-box { padding: 14px 16px; border-right: 1px solid var(--line); }
.kv-box > span { font-size: 11px; color: var(--muted); display: block; letter-spacing: .04em; }
.kv-box b { font-family: var(--serif); font-weight: 600; font-size: 28px; }
.kv-box .d { font-size: 12px; margin-top: 2px; }
.estado { font-weight: 500; font-size: 12px; }
.inv-input { width: 64px; padding: 6px 8px; }
.sim-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.cmp-arrow { color: var(--muted); padding: 0 6px; }
.formula { font-family: ui-monospace, Consolas, monospace; background: var(--panel); padding: 10px 12px; font-size: 12.5px; line-height: 1.7; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpis .kpi:nth-child(2) { border-right: none; }
  .kpis .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .dash, .two, .finder, .detail, .admin-perf, .sim-grid { grid-template-columns: 1fr; }
  .editor { position: static; max-height: none; }
  .similar { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: 1fr; }
  .newcat { grid-template-columns: 1fr 1fr; }
  .det-bottom { grid-template-columns: 1fr !important; }
  .dash[style] { grid-template-columns: 1fr !important; }
  .gallery { max-width: 420px; margin: 0 auto; width: 100%; }
  .mh-nav a { letter-spacing: .14em; }
  .mh-nav { gap: 18px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 30px 20px 26px; }
  .auth-logo { width: min(70%, 300px); }
  .auth-side .lead, .auth-side .feats { display: none; }
  .profile { grid-template-columns: 1fr; }
  .mh-inner { grid-template-columns: auto 1fr auto; height: 64px; padding: 0 16px; }
  .mh-nav.left, .mh-nav.right > a { display: none; }
  .mh-nav.right { gap: 0; }
  .mh-tools { border: none; padding: 0; margin: 0; }
  .lockup .emblem { width: 24px; height: 30px; }
  .lockup .wm-main { font-size: 17px; }
  .menu-toggle { display: inline-grid; }
  .mobile-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 16px; }
  .mobile-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text); }
  .mobile-nav a:last-child { border: none; }
  .user-mini .logout { display: none; }
  .main { padding: 24px 16px 50px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .shell-main { min-width: 0; }
  .sidebar { position: static; height: auto; padding: 14px 16px; }
  .sidebar .lockup { padding-bottom: 12px; }
  .sidebar .me .s { display: none; }
  .sidebar .role { margin: 10px 8px 8px; }
  .sidebar nav { flex-direction: row; overflow-x: auto; }
  .sidebar nav a { white-space: nowrap; border-left: none; border-bottom: 1px solid transparent; }
  .sidebar nav a.active { border-bottom-color: var(--gold); background: none; }
  .sidebar .me { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding-top: 10px; }
  .sidebar .logout { padding: 0; margin-left: auto; }
  .shell-main { padding: 24px 16px 50px; }
  .result { grid-template-columns: 26px 50px 1fr; }
  .result .pctbox, .result .btn { grid-column: 3; }
  .attrs { grid-template-columns: repeat(2, 1fr); }
  .search .input { min-width: 0; width: 100%; }
  .toolbar { flex-wrap: wrap; width: 100%; }
  .toolbar .search { flex: 1; }
  h1, .cat-head h1 { font-size: 32px; }
  .detail h1 { font-size: 38px; }
  .grid-cards { grid-template-columns: repeat(2, 1fr); gap: 26px 14px; }
  .pcard h3 { font-size: 18px; }
  .fb-clear { margin-left: 0; }
  .newcat { grid-template-columns: 1fr; }
  .dd-panel { position: fixed; left: 16px; right: 16px; top: auto; }
}
