/* Fase 10.5 — CSS verbatim de los bloques de estilo de Pages/Exchange/Index_VantasticDivisa.razor. Igual que hoy, es global mientras el componente está en pantalla:
   se enlaza con <link> donde estaba el bloque. Cambios: @@ → @ y capas D-51. */
/* ============ VANTASTIC DIVISA — Paleta Verde Esmeralda (propia de este módulo) ============ */
.vd-shell {
    --vd-olive: #0F6B4C;
    --vd-olive-deep: #0A4F38;
    --vd-olive-light: #4CA37F;
    --vd-olive-pale: #DFF3EA;
    --vd-olive-subtle: #F2FAF6;
    --vd-gold: #b8912a;
    --vd-terracotta: #b5533c;
    --vd-blue: #1a56db;
    --vd-ink: #1F2E27;
    --vd-muted: #5C6D64;
    --vd-border: #D7E6DE;
    --vd-radius: 12px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: var(--vd-ink);
    background: var(--vd-olive-subtle);
    padding: 1rem;
    max-width: 1680px;
    margin: 0 auto;
    box-sizing: border-box;
}
.vd-shell *, .vd-shell *::before, .vd-shell *::after { box-sizing: border-box; }

/* ---------- Header ---------- */
.vd-header {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem;
    background: linear-gradient(120deg, var(--vd-olive-deep), var(--vd-olive));
    color: #fff; padding: .85rem 1.25rem; border-radius: var(--vd-radius); margin-bottom: 1rem;
    box-shadow: 0 6px 18px rgba(10,79,56,.18);
}
.vd-brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.vd-brand-mark { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex: none; }
.vd-brand-text h1 { margin: 0; font-size: 1.25rem; font-weight: 500; color: #fff; }
.vd-brand-text h1 strong { font-weight: 700; }
.vd-brand-tag { font-size: .78rem; opacity: .85; letter-spacing: .02em; }
.vd-header-status { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.vd-clock { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.vd-clock .dv-clock-time { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.vd-clock .dv-clock-date { font-size: .75rem; opacity: .85; }
.vd-caja-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: rgba(255,255,255,.18); }
.vd-caja-pill.is-closed { background: rgba(0,0,0,.2); }
.vd-hdr-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 700; cursor: pointer; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.vd-hdr-buy { background: #16a34a; }
.vd-hdr-sell { background: var(--vd-terracotta); }
.vd-hdr-btn:hover { filter: brightness(1.08); }
.vd-hdr-cfg { background: rgba(255,255,255,.18); padding: 0 10px; }

/* ---------- Layout general ---------- */
.vd-top { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 1rem; margin-bottom: 1rem; align-items: stretch; }
.vd-grid { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 1.7fr) minmax(250px, 1fr); gap: 1rem; align-items: start; }
.vd-col-center { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

.vd-card { background: #fff; border: 1px solid var(--vd-border); border-radius: var(--vd-radius); overflow: hidden; box-shadow: 0 2px 8px rgba(10,79,56,.06); min-width: 0; }
.vd-card-head { display: flex; align-items: center; gap: .55rem; padding: .75rem 1.1rem; background: var(--vd-olive-pale); border-bottom: 1px solid var(--vd-border); color: var(--vd-olive-deep); min-height: 48px; }
.vd-card-head h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--vd-olive-deep); }
.vd-card-body { padding: 1rem 1.1rem; }

/* ---------- Operación principal ---------- */
.vd-hero { display: grid; grid-template-columns: minmax(150px, .9fr) 1fr 1fr; gap: .9rem; align-items: stretch; }
.vd-hero-pair { display: flex; align-items: center; gap: .75rem; }
.vd-hero-pair .dv-flag { border-radius: 4px; }
.vd-hero-code { font-size: 1.3rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.vd-hero-code i { font-size: .8rem; color: var(--vd-muted); margin: 0 .15rem; }
.vd-hero-sub { font-size: .75rem; color: var(--vd-muted); }
.vd-hero-rate {
    display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left;
    border: 1px solid var(--vd-border); border-radius: 12px; padding: .8rem 1rem; cursor: pointer; background: #fff;
    transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease; min-width: 0;
}
.vd-hero-rate:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(10,79,56,.12); }
.vd-hero-rate.is-buy { border-left: 5px solid var(--vd-olive); }
.vd-hero-rate.is-sell { border-left: 5px solid var(--vd-terracotta); }
.vd-hero-lbl { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--vd-muted); }
.vd-hero-val { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.vd-hero-rate.is-buy .vd-hero-val { color: var(--vd-olive-deep); }
.vd-hero-rate.is-sell .vd-hero-val { color: var(--vd-terracotta); }
.vd-hero-cta { font-size: .78rem; font-weight: 700; color: var(--vd-muted); }
.vd-hero-rate.is-buy:hover .vd-hero-cta { color: var(--vd-olive); }
.vd-hero-rate.is-sell:hover .vd-hero-cta { color: var(--vd-terracotta); }
.vd-hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.vd-chip-warn { font-size: .74rem; font-weight: 700; color: var(--vd-terracotta); background: rgba(181,83,60,.1); padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; }

.vd-other-title { margin: 1rem 0 .4rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--vd-muted); }
.vd-other-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .4rem .9rem; }
.vd-other-row { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px dashed var(--vd-border); min-width: 0; }
.vd-other-pair { font-weight: 700; font-size: .85rem; flex: 1; white-space: nowrap; }
.vd-other-btn { border: none; border-radius: 6px; padding: .25rem .5rem; font-size: .8rem; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.vd-other-btn small { font-size: .62rem; opacity: .75; margin-right: .15rem; }
.vd-other-btn.is-buy { background: var(--vd-olive-pale); color: var(--vd-olive-deep); }
.vd-other-btn.is-sell { background: rgba(181,83,60,.1); color: var(--vd-terracotta); }

/* ---------- Sesión ---------- */
.vd-kv { margin: 0; }
.vd-kv-row { display: flex; justify-content: space-between; gap: .5rem; padding: .38rem 0; border-bottom: 1px dashed var(--vd-border); font-size: .86rem; }
.vd-kv-row dt { color: var(--vd-muted); font-weight: 600; }
.vd-kv-row dd { margin: 0; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-kv-total dd { color: var(--vd-olive-deep); font-size: 1.05rem; }

/* ---------- KPIs ---------- */
.vd-kpis { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.vd-kpi { display: flex; align-items: center; gap: .65rem; background: #fff; border: 1px solid var(--vd-border); border-radius: var(--vd-radius); padding: .7rem .85rem; min-width: 0; }
.vd-kpi-ic { width: 36px; height: 36px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--vd-olive-pale); color: var(--vd-olive-deep); }
.vd-kpi.is-buy .vd-kpi-ic { background: rgba(22,163,74,.12); color: #15803d; }
.vd-kpi.is-sell .vd-kpi-ic { background: rgba(181,83,60,.12); color: var(--vd-terracotta); }
.vd-kpi.is-muted .vd-kpi-ic { background: #f1f3f2; color: #8a9690; }
.vd-kpi b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-kpi small { display: block; font-size: .72rem; color: var(--vd-muted); font-weight: 600; }
.vd-kpi-loading { position: absolute; top: -.55rem; right: .3rem; font-size: .75rem; color: var(--vd-muted); }

/* ---------- Botones ---------- */
.vd-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: none; border-radius: 8px; padding: .55rem 1rem; font-weight: 600; font-size: .88rem; cursor: pointer; transition: filter .15s ease; }
.vd-btn:hover { filter: brightness(0.95); }
.vd-btn:disabled { opacity: .55; cursor: default; }
.vd-btn-block { width: 100%; margin-top: .9rem; }
.vd-btn-sm { padding: .3rem .65rem; font-size: .76rem; height: 30px; }
.vd-btn-primary { background: var(--vd-olive); color: #fff; }
.vd-btn-danger { background: var(--vd-terracotta); color: #fff; }
.vd-btn-outline { background: #fff; color: var(--vd-olive-deep); border: 1px solid var(--vd-border); }
.vd-link-btn { border: none; background: none; color: var(--vd-olive); font-weight: 700; font-size: .78rem; cursor: pointer; padding: .15rem .3rem; display: inline-flex; align-items: center; gap: .3rem; }
.vd-link-btn:disabled { opacity: .5; }
.vd-icon-btn { width: 30px; height: 30px; border-radius: 6px; border: none; background: rgba(15,107,76,.12); color: var(--vd-olive-deep); cursor: pointer; flex: none; }
.vd-icon-btn:disabled { opacity: .5; cursor: default; }

/* ---------- Tabs / cotizaciones ---------- */
.vd-tabs { justify-content: flex-start; gap: 0; padding: 0 .5rem; flex-wrap: wrap; }
.vd-tab { border: none; background: transparent; padding: .8rem .8rem; font-weight: 600; font-size: .85rem; color: var(--vd-muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.vd-tab.is-active { color: var(--vd-olive-deep); border-bottom-color: var(--vd-olive); }
.vd-tab-spacer { flex: 1; }
.vd-updated { font-size: .74rem; color: var(--vd-muted); margin-right: .4rem; }

.vd-follow-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .7rem; }
.vd-currency-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; max-height: 132px; overflow-y: auto; padding: .4rem; border: 1px dashed var(--vd-border); border-radius: 8px; }
.vd-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .22rem .6rem; border-radius: 20px; border: 1px solid var(--vd-border); background: #fff; color: var(--vd-muted); cursor: pointer; }
.vd-badge:hover { border-color: var(--vd-olive); }
.vd-badge.is-active { background: var(--vd-olive-pale); color: var(--vd-olive-deep); border-color: var(--vd-olive); }

.vd-rate-list { display: flex; flex-direction: column; }
.vd-rate-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .75rem; padding: .5rem .1rem; border-bottom: 1px solid var(--vd-border); }
.vd-rate-pair { font-weight: 600; display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
.vd-pair-arrow { color: var(--vd-muted); font-size: .7rem; }
.vd-rate-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.vd-rate-trend { font-size: .8rem; font-weight: 700; display: flex; align-items: center; gap: .25rem; justify-content: flex-end; min-width: 62px; }
.vd-rate-trend.up { color: var(--vd-olive); }
.vd-rate-trend.down { color: var(--vd-terracotta); }
.vd-rate-trend.flat { color: var(--vd-muted); }

.vd-hint { font-size: .76rem; color: var(--vd-muted); margin: .75rem 0 0; }
.vd-hint-error { color: var(--vd-terracotta); font-weight: 600; }
.vd-table-wrap { overflow-x: auto; }
.vd-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.vd-table th { text-align: left; color: var(--vd-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; padding: .4rem .3rem; border-bottom: 2px solid var(--vd-border); }
.vd-table td { padding: .5rem .3rem; border-bottom: 1px solid var(--vd-border); }
.vd-table td.vd-rate-pair { display: table-cell; }
.vd-value-buy { color: var(--vd-olive-deep); font-weight: 700; }
.vd-value-sell { color: var(--vd-terracotta); font-weight: 700; }
.vd-input-inline { width: 100px; max-width: 100%; padding: .3rem .4rem; border: 1px solid var(--vd-border); border-radius: 6px; font-weight: 600; }
.vd-empty { color: var(--vd-muted); font-size: .85rem; text-align: center; padding: 1rem 0; margin: 0; }

/* ---------- Accesos rápidos ---------- */
.vd-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.vd-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: .95rem .4rem; border: none; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .82rem; transition: transform .1s ease, filter .15s ease; text-align: center; }
.vd-action:hover { filter: brightness(0.97); transform: translateY(-1px); }
.vd-action i { font-size: 1.25rem; }
.vd-action-buy { background: rgba(15,107,76,.13); color: var(--vd-olive-deep); }
.vd-action-sell { background: rgba(181,83,60,.12); color: var(--vd-terracotta); }
.vd-action-report { background: rgba(184,145,42,.14); color: #8a6b1c; }
.vd-action-cashin { background: rgba(26,86,219,.09); color: #1a4fba; }
.vd-action-cashout { background: rgba(124,58,237,.09); color: #6d28d9; }
.vd-report-item.is-featured { border-color: var(--vd-olive); background: var(--vd-olive-subtle); }
.vd-action-neutral { background: #eef3f0; color: var(--vd-ink); }
.vd-action-wide { grid-column: 1 / -1; flex-direction: row; gap: .6rem; padding: .8rem; }

.vd-reportes-panel { display: flex; flex-direction: column; gap: .5rem; }
.vd-back-btn { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; border: none; background: none; color: var(--vd-olive-deep); font-weight: 700; font-size: .82rem; cursor: pointer; padding: 0 0 .3rem; }
.vd-report-item { display: flex; align-items: center; gap: .7rem; text-align: left; border: 1px solid var(--vd-border); border-radius: 10px; padding: .6rem .7rem; background: #fff; cursor: pointer; width: 100%; font: inherit; color: inherit; }
.vd-report-item:hover { border-color: var(--vd-olive); background: var(--vd-olive-subtle); }
.vd-report-item.is-disabled { cursor: default; opacity: .55; }
.vd-report-item.is-disabled:hover { border-color: var(--vd-border); background: #fff; }
.vd-report-ic { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; background: rgba(184,145,42,.16); color: #8a6b1c; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.vd-report-txt { flex: 1; min-width: 0; }
.vd-report-txt b { display: block; font-size: .84rem; }
.vd-report-txt small { display: block; font-size: .72rem; color: var(--vd-muted); margin-top: .1rem; }
.vd-report-pill { font-size: .62rem; font-weight: 700; padding: .15rem .5rem; border-radius: 20px; background: var(--vd-olive-pale); color: var(--vd-olive-deep); white-space: nowrap; }
.vd-report-pill.is-soon { background: #f1f1f1; color: #888; }

/* ---------- Histórico ---------- */
.vd-hist-label { font-size: .78rem; color: var(--vd-muted); font-weight: 600; }
.vd-hist-select { width: auto; margin: .4rem .2rem; }
.vd-hist-subtitulo { display: block; font-size: .7rem; color: var(--vd-muted); margin-bottom: .4rem; }
.vd-hist-svg { display: block; overflow: visible; }

/* ---------- Índices ---------- */
.vd-idx-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; padding: .55rem 1.1rem; border-bottom: 1px solid var(--vd-border); background: #fbfdfc; }
.vd-bursatil-body { display: flex; flex-direction: column; padding: 0; }
.vd-idx-alert { display: flex; align-items: flex-start; gap: .5rem; flex-wrap: wrap; margin: .75rem 1.1rem 0; padding: .6rem .7rem; border-radius: 8px; background: rgba(184,145,42,.12); color: #7a5d12; font-size: .78rem; font-weight: 600; }
.vd-idx-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem 1.1rem; border-bottom: 1px solid var(--vd-olive-pale); }
.vd-idx-name { font-size: .84rem; font-weight: 700; }
.vd-idx-sub { font-size: .7rem; color: var(--vd-muted); }
.vd-idx-right { text-align: right; }
.vd-idx-val { font-size: .88rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vd-idx-nodisp { color: #94A3A0; font-weight: 500; font-style: italic; font-size: .82rem; }
.vd-idx-chg { font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vd-idx-chg.up { color: var(--vd-olive); }
.vd-idx-chg.down { color: var(--vd-terracotta); }
.vd-bursatil-foot { padding: .7rem 1.1rem 1rem; margin: 0; }

.vd-loading-overlay { position: fixed; inset: 0; background: rgba(10,79,56,.18); display: flex; align-items: center; justify-content: center; z-index: calc(var(--z-modal) - 1) /* D-51 (era 2000): debajo de los modales */; }
.vd-spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(255,255,255,.6); border-top-color: var(--vd-olive); animation: vd-spin 0.8s linear infinite; }
@keyframes vd-spin { to { transform: rotate(360deg); } }

/* ============ Responsive ============ */
/* 1366/1440: tres columnas abajo pero más compactas */
@media (max-width: 1500px) {
    .vd-hero-val { font-size: 1.75rem; }
    .vd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Menos de 1280px: cotizaciones arriba a todo el ancho; accesos e índices lado a lado (sin huecos) */
@media (max-width: 1280px) {
    .vd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vd-col-center { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 980px) {
    .vd-top { grid-template-columns: 1fr; }
    .vd-hero { grid-template-columns: 1fr 1fr; }
    .vd-hero-pair { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .vd-shell { padding: .6rem; }
    .vd-grid { grid-template-columns: 1fr; }
    .vd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vd-header { flex-direction: column; align-items: stretch; }
    .vd-header-status { justify-content: space-between; }
    .vd-hero-val { font-size: 1.5rem; }
    .vd-other-list { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .vd-hero { grid-template-columns: 1fr; }
    .vd-hdr-btn span { display: none; }
}
