/* ============================================================
   FDS ECN RD — Analytics Dashboard Styles
   Paleta: #A63251 · #633A8C · #AC8A56  |  Tipografía: Lato
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,400&display=swap');

/* ── CSS Variables ── */
.fds-dashboard {
    --fds-navy:      #1C0E2E;
    --fds-navy-mid:  #2D1A4A;
    --fds-navy-soft: #633A8C;
    --fds-gold:      #AC8A56;
    --fds-gold-light:#C9AA7A;
    --fds-crimson:   #A63251;
    --fds-crimson-lt:#C97090;
    --fds-cream:     #FAF7F9;
    --fds-white:     #FFFFFF;
    --fds-accent:    #A63251;
    --fds-accent2:   #C97090;
    --fds-text:      #1C0E2E;
    --fds-muted:     #7A6A82;
    --fds-border:    #EAE0EE;
    --fds-radius:    12px;
    --fds-shadow:    0 4px 24px rgba(28,14,46,.08);
    --fds-shadow-md: 0 8px 40px rgba(28,14,46,.14);

    font-family: 'Lato', sans-serif;
    color: var(--fds-text);
    background: var(--fds-cream);
    padding: 0 0 48px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Header ── */
.fds-header {
    background: linear-gradient(135deg, var(--fds-navy) 0%, var(--fds-navy-mid) 55%, #3D2060 100%);
    border-radius: var(--fds-radius) var(--fds-radius) 0 0;
    padding: 28px 36px;
    position: relative;
    overflow: hidden;
}

.fds-header::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(172,138,86,.22) 0%, transparent 70%);
}

.fds-header::after {
    content: '';
    position: absolute;
    bottom: -40px; left: 30%;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(166,50,81,.18) 0%, transparent 70%);
}

.fds-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.fds-header-left { display: flex; align-items: center; gap: 16px; }

.fds-logo-mark {
    font-size: 28px;
    color: var(--fds-gold);
    line-height: 1;
    text-shadow: 0 0 20px rgba(172,138,86,.55);
}

.fds-title {
    margin: 0;
    font-family: 'Lato', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--fds-white);
    letter-spacing: .04em;
    line-height: 1.1;
    text-transform: uppercase;
}

.fds-subtitle-text {
    margin: 4px 0 0;
    font-size: .72rem;
    font-weight: 300;
    color: var(--fds-gold-light);
    letter-spacing: .18em;
    text-transform: uppercase;
}

.fds-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fds-filter-wrap { display: flex; flex-direction: column; gap: 4px; }

.fds-filter-label {
    font-size: .68rem;
    font-weight: 700;
    color: var(--fds-gold-light);
    text-transform: uppercase;
    letter-spacing: .12em;
}

.fds-select {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(172,138,86,.45);
    color: var(--fds-white);
    padding: 7px 14px;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: .85rem;
    cursor: pointer;
    min-width: 160px;
    outline: none;
    transition: border-color .2s;
    backdrop-filter: blur(4px);
}
.fds-select option { background: var(--fds-navy-mid); color: var(--fds-white); }
.fds-select:focus  { border-color: var(--fds-gold); }

.fds-btn-export {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--fds-gold);
    color: var(--fds-navy);
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    white-space: nowrap;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.fds-btn-export:hover {
    background: var(--fds-gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(172,138,86,.4);
}

/* ── KPI Cards ── */
.fds-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--fds-border);
    border: 1px solid var(--fds-border);
    overflow: hidden;
}

.fds-kpi-card {
    background: var(--fds-white);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.fds-kpi-card.fds-kpi-accent { background: #F9EFF3; }
.fds-kpi-card.fds-kpi-gold   { background: #FAF5EE; }
.fds-kpi-card.fds-kpi-dark   { background: var(--fds-navy); }
.fds-kpi-card.fds-kpi-dark .fds-kpi-number { color: var(--fds-gold); }
.fds-kpi-card.fds-kpi-dark .fds-kpi-label  { color: rgba(255,255,255,.6); }

.fds-kpi-icon { font-size: 1.5rem; line-height: 1; margin-bottom: 4px; }

.fds-kpi-number {
    font-family: 'Lato', sans-serif;
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--fds-navy);
    line-height: 1;
}

.fds-kpi-label {
    font-size: .68rem;
    font-weight: 700;
    color: var(--fds-muted);
    text-transform: uppercase;
    letter-spacing: .09em;
    line-height: 1.3;
    max-width: 120px;
}

/* ── Rows & Cards ── */
.fds-row {
    display: flex;
    gap: 20px;
    padding: 20px 0 0;
    flex-wrap: wrap;
}

.fds-card {
    background: var(--fds-white);
    border: 1px solid var(--fds-border);
    border-radius: var(--fds-radius);
    padding: 24px 24px 20px;
    box-shadow: var(--fds-shadow);
    overflow: hidden;
    position: relative;
}

/* Accent stripe */
.fds-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(to bottom, var(--fds-crimson), var(--fds-navy-soft));
    border-radius: var(--fds-radius) 0 0 var(--fds-radius);
}

.fds-card-sm   { flex: 1 1 260px; min-width: 0; }
.fds-card-md   { flex: 1 1 340px; min-width: 0; }
.fds-card-full { flex: 1 1 100%;  min-width: 0; }

.fds-card-title {
    margin: 0 0 4px;
    font-family: 'Lato', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    color: var(--fds-navy);
    text-transform: uppercase;
    letter-spacing: .07em;
}

.fds-card-desc {
    margin: 0 0 16px;
    font-size: .75rem;
    font-weight: 300;
    color: var(--fds-muted);
}

.fds-chart-wrap {
    position: relative;
    height: 240px;
    margin-top: 12px;
}

.fds-chart-wrap.fds-chart-doughnut { height: 220px; }
.fds-chart-wrap.fds-chart-tall     { height: 280px; }

/* ── Word Cloud ── */
.fds-wordcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px 0 4px;
    min-height: 120px;
}

.fds-word-tag {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 20px;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    cursor: default;
    transition: transform .15s, box-shadow .15s;
    white-space: nowrap;
    letter-spacing: .02em;
}
.fds-word-tag:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
}

.fds-word-tag.wc-xl  { font-size: 1.2rem;  background: var(--fds-navy);     color: #fff; }
.fds-word-tag.wc-lg  { font-size: 1rem;    background: var(--fds-navy-soft); color: #fff; }
.fds-word-tag.wc-md  { font-size: .88rem;  background: var(--fds-crimson);   color: #fff; }
.fds-word-tag.wc-sm  { font-size: .76rem;  background: var(--fds-border);    color: var(--fds-text); }
.fds-word-tag.wc-xs  { font-size: .67rem;  background: var(--fds-cream);     color: var(--fds-muted); border: 1px solid var(--fds-border); }

.fds-word-tag.wc-xl:nth-child(3n) { background: var(--fds-gold);    color: var(--fds-navy); }
.fds-word-tag.wc-lg:nth-child(4n) { background: var(--fds-crimson); color: #fff; }
.fds-word-tag.wc-md:nth-child(5n) { background: var(--fds-gold);    color: var(--fds-navy); }

/* ── Quotes ── */
.fds-quotes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.fds-quote {
    background: var(--fds-cream);
    border-left: 3px solid var(--fds-crimson);
    border-radius: 0 8px 8px 0;
    padding: 16px 18px;
    margin: 0;
}
.fds-quote:nth-child(3n+2) { border-left-color: var(--fds-navy-soft); }
.fds-quote:nth-child(3n+3) { border-left-color: var(--fds-gold);      }

.fds-quote p {
    margin: 0 0 10px;
    font-size: .87rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--fds-text);
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fds-quote footer { display: flex; flex-wrap: wrap; gap: 6px; }

.fds-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fds-badge-rol  { background: var(--fds-navy);     color: var(--fds-white); }
.fds-badge-dio  { background: var(--fds-navy-soft); color: var(--fds-white); }
.fds-badge-date { background: var(--fds-border);    color: var(--fds-muted); }

/* ── Footer ── */
.fds-footer {
    text-align: center;
    padding: 20px;
    font-size: .72rem;
    font-weight: 300;
    color: var(--fds-muted);
    border-top: 1px solid var(--fds-border);
    margin-top: 20px;
    letter-spacing: .05em;
}

/* ── Loading spinner ── */
.fds-loading { position: relative; pointer-events: none; opacity: .5; transition: opacity .3s; }
.fds-loading::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 36px; height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid var(--fds-border);
    border-top-color: var(--fds-crimson);
    border-radius: 50%;
    animation: fds-spin .7s linear infinite;
    z-index: 100;
}
@keyframes fds-spin { to { transform: rotate(360deg); } }

/* ── Admin ── */
.fds-admin-wrap h1 { font-family: 'Lato', sans-serif; font-weight: 900; font-size: 1.8rem; }
.fds-subtitle { color: #7A6A82; margin-top: -6px; margin-bottom: 24px; }
.fds-admin-cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.fds-admin-card {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 4px solid #A63251;
    border-radius: 10px;
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.fds-card-number { font-family: 'Lato', sans-serif; font-size: 2.4rem; color: #1C0E2E; font-weight: 900; line-height: 1; }
.fds-card-label  { font-size: .72rem; font-weight: 700; color: #7A6A82; text-transform: uppercase; letter-spacing: .09em; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .fds-kpis { grid-template-columns: repeat(2, 1fr); }
    .fds-header { padding: 20px; }
    .fds-title { font-size: 1.3rem; }
    .fds-header-inner { flex-direction: column; align-items: flex-start; }
    .fds-kpi-number { font-size: 2rem; }
    .fds-card { padding: 16px; }
}
@media (max-width: 480px) {
    .fds-kpis { grid-template-columns: 1fr 1fr; }
    .fds-quotes { grid-template-columns: 1fr; }
    .fds-btn-export { padding: 8px 14px; font-size: .76rem; }
}
