:root {
    --arqueo-bg-main: #f2f4f7;
    --arqueo-card-bg: #ffffff;
    --arqueo-text: #171a2b;
    --arqueo-muted: #8c92a7;
    --arqueo-border: #e8ebf1;
    --arqueo-blue: #2f9bff;
    --arqueo-cyan: #2dc1d7;
    --arqueo-yellow: #e6aa2d;
    --arqueo-shadow-soft: 0 14px 30px rgba(26, 40, 80, 0.08);
    --arqueo-shadow-card: 0 18px 38px rgba(34, 52, 92, 0.09);
}

body {
    margin: 0;
    background: var(--arqueo-bg-main);
    color: var(--arqueo-text);
    font-family: "Inter Fallback", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.meseros-shell {
    min-height: 100vh;
    display: flex;
    gap: 1.2rem;
    padding: 1rem;
}

.arqueo-main {
    flex: 1;
    min-width: 0;
    border-radius: 20px;
    border: 1px solid var(--arqueo-border);
    background: #f7f8fb;
    padding: 1rem;
    box-shadow: var(--arqueo-shadow-soft);
}

.arqueo-topbar {
    background: var(--arqueo-card-bg);
    border: 1px solid var(--arqueo-border);
    border-radius: 18px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 8px 20px rgba(22, 34, 67, 0.04);
}

.arqueo-topbar-actions {
    gap: 0.62rem;
}

.arqueo-topbar-btn {
    min-height: 36px;
    padding: 0.48rem 1rem;
}

.arqueo-kpi-card,
.arqueo-panel {
    border: 1px solid var(--arqueo-border) !important;
    border-radius: 16px;
    background: var(--arqueo-card-bg);
    box-shadow: var(--arqueo-shadow-card);
}

.arqueo-kpi-label {
    font-size: 0.88rem;
    color: #394158;
    font-weight: 500;
}

.arqueo-kpi-dots {
    color: #9aa1b4;
    font-weight: 700;
}

.arqueo-kpi-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.arqueo-kpi-change {
    font-size: 0.74rem;
    font-weight: 600;
}

.arqueo-mini-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.arqueo-mini-bars span {
    width: 4px;
    height: 34px;
    border-radius: 8px;
    background: #cfd8e9;
}

.arqueo-mini-bars span:nth-child(1),
.arqueo-mini-bars span:nth-child(2),
.arqueo-mini-bars span:nth-child(3),
.arqueo-mini-bars span:nth-child(4),
.arqueo-mini-bars span:nth-child(5) {
    background: var(--arqueo-cyan);
}

.arqueo-mini-bars-blue span:nth-child(1),
.arqueo-mini-bars-blue span:nth-child(3),
.arqueo-mini-bars-blue span:nth-child(5) {
    height: 20px;
}

.arqueo-mini-bars-blue span:nth-child(2),
.arqueo-mini-bars-blue span:nth-child(6) {
    height: 30px;
}

.arqueo-mini-bars-blue span:nth-child(4),
.arqueo-mini-bars-blue span:nth-child(8) {
    height: 38px;
}

.arqueo-mini-wave {
    width: 88px;
    height: 38px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(245, 203, 108, 0.24), rgba(245, 203, 108, 0.03));
}

.arqueo-mini-wave::before {
    content: "";
    position: absolute;
    inset: 9px 6px 6px;
    background: linear-gradient(180deg, rgba(243, 189, 69, 0.2), rgba(243, 189, 69, 0));
    clip-path: polygon(0% 60%, 10% 60%, 18% 44%, 28% 44%, 36% 53%, 48% 53%, 58% 29%, 69% 29%, 78% 47%, 88% 47%, 100% 15%, 100% 100%, 0% 100%);
}

.arqueo-mini-wave::after {
    content: "";
    position: absolute;
    inset: 8px 6px 10px;
    background: #efbd51;
    clip-path: polygon(0% 63%, 10% 63%, 18% 47%, 28% 47%, 36% 56%, 48% 56%, 58% 31%, 69% 31%, 78% 49%, 88% 49%, 100% 18%, 100% 28%, 88% 55%, 78% 55%, 69% 37%, 58% 37%, 48% 61%, 36% 61%, 28% 52%, 18% 52%, 10% 68%, 0% 68%);
    box-shadow: 0 0 0 1px rgba(239, 189, 81, 0.05);
}

.arqueo-mini-gauge {
    width: 72px;
    height: 38px;
    border-radius: 80px 80px 0 0;
    border: 5px solid #d9e3f2;
    border-bottom: 0;
    position: relative;
}

.arqueo-mini-gauge::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 80px 80px 0 0;
    border: 5px solid transparent;
    border-top-color: var(--arqueo-blue);
    border-right-color: var(--arqueo-yellow);
    border-bottom: 0;
}

.arqueo-needle {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 2px;
    height: 18px;
    background: #2b2f44;
    transform: translateX(-50%) rotate(35deg);
    transform-origin: bottom center;
}

.arqueo-title-block {
    font-size: 1.48rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.arqueo-chart-wrap {
    height: 280px;
}

.arqueo-chart-bars {
    height: 260px;
}

.chart-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: #f7f9fd;
    border: 1px solid #e1e7f2;
}

.chart-btn {
    font-family: inherit;
    border: 1px solid #e5d6a6;
    background: #ffffff;
    color: #59617a;
    border-radius: 12px;
    min-height: 38px;
    padding: 0.42rem 0.98rem;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(26, 38, 71, 0.04);
    transition: all 0.2s ease;
}

.chart-btn:hover,
.chart-btn:focus-visible {
    border-color: #d8c486;
    background: #fffcf0;
    color: #1f2940;
    box-shadow: 0 10px 20px rgba(26, 38, 71, 0.08);
}

.chart-btn-solid {
    border-color: #2f85fb;
    background: linear-gradient(180deg, #4da4ff, #2c80f6);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(45, 130, 247, 0.25);
}

.chart-btn-solid:hover,
.chart-btn-solid:focus-visible {
    border-color: #2674e7;
    background: linear-gradient(180deg, #429cff, #246fe8);
    color: #ffffff;
}

.chart-chip {
    font-family: inherit;
    border: 1px solid transparent;
    background: transparent;
    color: #667089;
    border-radius: 999px;
    min-height: 35px;
    padding: 0.28rem 0.94rem;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.chart-chip:hover,
.chart-chip:focus-visible {
    border-color: #d9dfea;
    background: #ffffff;
    color: #2f3448;
}

.chart-chip.active {
    border-color: #2d88ff;
    background: linear-gradient(180deg, #3d98ff, #297cf7);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(46, 129, 250, 0.26);
}

.nav-pills.arqueo-pills .chart-chip {
    border-radius: 12px;
}

.arqueo-cards-box {
    border: 1px solid #e6eaf2;
    border-radius: 22px;
    padding: 0.9rem 0.95rem 0.95rem;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(247, 249, 253, 0.95);
}

.arqueo-card-group-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #8e96a9;
}

.arqueo-card-stack-clean {
    margin-bottom: 0;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 0.9rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 0.15rem 2.1rem 0.25rem 0;
    cursor: grab;
    user-select: none;
}

.arqueo-card-stack-clean::-webkit-scrollbar {
    display: none;
}

.arqueo-card-stack-clean.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.arqueo-fintech-card {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    border-radius: 18px;
    padding: 0.92rem 1rem 0.95rem;
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(20, 30, 58, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.22);
    position: relative;
    min-height: 168px;
}

.arqueo-fintech-card::after {
    content: "";
    position: absolute;
    right: -46px;
    top: 10px;
    width: 92px;
    height: calc(100% - 20px);
    border-radius: 0 16px 16px 0;
    background: rgba(21, 25, 37, 0.9);
    box-shadow: 0 10px 22px rgba(18, 22, 33, 0.18);
    z-index: -1;
}

.arqueo-fintech-card-efectivo {
    background: linear-gradient(135deg, #1ca55e, #1ca55e);
}

.arqueo-fintech-card-transferencia {
    background:
        radial-gradient(circle at 50% 0%, rgba(157, 83, 255, 0.88), transparent 42%),
        radial-gradient(circle at 82% 42%, rgba(28, 174, 215, 0.85), transparent 34%),
        linear-gradient(135deg, #19191d, #2b2a33);
}

.arqueo-fintech-card-tarjeta {
    background:
        radial-gradient(circle at 40% 0%, rgba(124, 41, 246, 0.85), transparent 34%),
        radial-gradient(circle at 82% 38%, rgba(35, 187, 231, 0.75), transparent 32%),
        linear-gradient(135deg, #17171c, #292930);
}

.arqueo-fintech-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.arqueo-chip-icon {
    font-size: 0.84rem;
    opacity: 0.9;
    letter-spacing: -0.08em;
}

.arqueo-brand {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.arqueo-fintech-card-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 1.15rem;
    position: relative;
    z-index: 1;
}

.arqueo-fintech-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    position: relative;
    z-index: 1;
}

.arqueo-fintech-card-meta small {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.18rem;
}

.arqueo-fintech-card-meta strong {
    font-size: 1rem;
    font-weight: 700;
}

.arqueo-card-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.65rem;
}

.arqueo-card-indicators {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.arqueo-card-indicators button {
    border: 0;
    padding: 0;
    cursor: pointer;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d8deea;
}

.arqueo-card-indicators button.is-active {
    width: 16px;
    border-radius: 999px;
    background: #7f5cf7;
}

.arqueo-card-arrows {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.arqueo-card-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #edf0f6;
    background: #ffffff;
    color: #40475f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(28, 42, 73, 0.08);
    transition: all 0.2s ease;
}

.arqueo-card-arrow svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.arqueo-card-arrow:hover,
.arqueo-card-arrow:focus-visible {
    background: #f8faff;
    border-color: #dfe5f0;
    color: #1d2540;
}

.wallet-action-btn {
    border: 1px solid #e8ecf3;
    background: #fbfcff;
    color: #232839;
    border-radius: 14px;
    min-height: 52px;
    padding: 0.68rem 1.05rem;
    font-size: 0.98rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.58rem;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.wallet-action-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.85;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wallet-action-btn:hover,
.wallet-action-btn:focus-visible {
    background: #eef3fb;
    border-color: #d9e1ee;
    color: #1a2133;
    box-shadow: 0 10px 16px rgba(23, 76, 162, 0.08);
}

.wallet-action-row .wallet-action-btn {
    flex: 1 1 0;
    min-width: 128px;
}

.wallet-action-row {
    padding-top: 0.8rem;
    gap: 0.9rem !important;
}

.wallet-action-btn {
    box-shadow: 0 6px 14px rgba(23, 34, 66, 0.035), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.arqueo-money-value {
    font-size: 2.2rem;
    font-weight: 700;
}

.arqueo-muted {
    color: var(--arqueo-muted);
    font-size: 0.82rem;
}

.arqueo-pills .nav-link {
    border: 0;
    background: transparent;
    padding: 0;
}

.arqueo-limit-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.arqueo-limit-value span {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.arqueo-limit-headline small {
    color: #1b1f31 !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
}

.arqueo-limit-bars {
    display: grid;
    grid-template-columns: repeat(28, minmax(0, 1fr));
    gap: 3px;
    margin-top: 0.32rem;
    align-items: end;
}

.limit-segment {
    border: 0;
    border-radius: 999px;
    height: 30px;
    min-width: 0;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.limit-segment:hover,
.limit-segment:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.03);
    outline: 2px solid rgba(15, 29, 59, 0.15);
}

.segment-gasto {
    background: linear-gradient(180deg, #2d73fb, #3f92ff);
}

.segment-empleado {
    background: linear-gradient(180deg, #43a5ff, #4fc9ff);
}

.segment-nomina {
    background: linear-gradient(180deg, #4ed6e4, #62e6d7);
}

.segment-operativo {
    background: linear-gradient(180deg, #70e5d7, #7ff1ca);
}

.segment-empty {
    background: #ebedf2;
}

.arqueo-side-stack {
    gap: 1.15rem;
}

.arqueo-side-stack .arqueo-panel:first-child .card-body {
    padding-bottom: 1rem;
}

.arqueo-side-stack .arqueo-panel:last-child .card-body {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.arqueo-heatmap-grid {
    display: grid;
    gap: 0.36rem;
    margin-top: 0.65rem;
}

.arqueo-heatmap-row {
    display: grid;
    grid-template-columns: 62px 1fr;
    align-items: center;
    gap: 0.5rem;
}

.arqueo-heatmap-row > span {
    font-size: 0.76rem;
    color: #454c63;
}

.arqueo-heatmap-row > div {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.arqueo-heatmap-row i {
    display: block;
    height: 28px;
    border-radius: 7px;
    background: #dce4f9;
    box-shadow: inset 0 0 0 1px rgba(158, 174, 212, 0.12);
}

.arqueo-heatmap-row i.active {
    background: #1749f5;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.arqueo-heatmap-row i.soft {
    background: #9fb7fb;
}

.arqueo-heatmap-row i.muted {
    background: #edf1ff;
}

.arqueo-heatmap-row i.value-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 700;
    background: #2657f3;
    cursor: pointer;
    pointer-events: auto;
}

.arqueo-heatmap-row i.value-cell.value-light {
    color: #50576d;
    background: #dde4ff;
}

.arqueo-heatmap-row i.value-cell:focus-visible {
    outline: 2px solid rgba(38, 87, 243, 0.25);
    outline-offset: 2px;
}

.arqueo-heatmap-days {
    display: grid;
    grid-template-columns: 62px repeat(7, minmax(0, 1fr));
    align-items: center;
    margin-top: 0.55rem;
    font-size: 0.73rem;
    color: #5a6278;
}

.arqueo-heatmap-days span:first-child {
    visibility: hidden;
}

.arqueo-panel-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e7ebf3;
    color: #646c82;
}

.arqueo-panel-icon svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.arqueo-trend-filter,
.arqueo-trend-more {
    font-family: inherit;
    border: 1px solid #e7ebf3;
    background: #ffffff;
    color: #4b536a;
    height: 36px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(26, 38, 71, 0.04);
}

.arqueo-trend-filter {
    min-width: 74px;
    padding: 0 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    position: relative;
}

.arqueo-trend-filter::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;
    transform: rotate(45deg);
    display: inline-block;
    margin-left: 0.5rem;
    margin-top: -0.2rem;
}

.arqueo-trend-more {
    width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.arqueo-trend-more span {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
}

.arqueo-trend-filter:hover,
.arqueo-trend-filter:focus-visible,
.arqueo-trend-more:hover,
.arqueo-trend-more:focus-visible {
    border-color: #d7cd97;
    background: #fffdf4;
    color: #1f2940;
    box-shadow: 0 10px 20px rgba(26, 38, 71, 0.08);
}

body.theme-dark {
    --arqueo-bg-main: #1b1d2d;
    --arqueo-card-bg: #242638;
    --arqueo-text: #f5f7ff;
    --arqueo-muted: #aeb4ca;
    --arqueo-border: #33384f;
}

body.theme-dark .arqueo-main {
    background: #1f2232;
}

body.theme-dark .btn-outline-secondary {
    color: #d8deef;
    border-color: #4a526e;
}

body.theme-dark .chart-btn {
    border-color: #5b6178;
    background: #2b2f44;
    color: #e4e9f7;
}

body.theme-dark .chart-btn:hover,
body.theme-dark .chart-btn:focus-visible {
    border-color: #707892;
    background: #34394f;
    color: #ffffff;
}

body.theme-dark .chart-chip {
    background: #2f3448;
    color: #aeb6ce;
}

body.theme-dark .chart-chip.active {
    border-color: #7fb0ff;
    background: linear-gradient(180deg, #4093ff, #2f7ef0);
    color: #ffffff;
}

body.theme-dark .wallet-action-btn {
    border-color: #4f5770;
    background: #2a2f42;
    color: #dce2f3;
}

body.theme-dark .chart-toggle {
    background: #2b3044;
    border-color: #454d66;
}

body.theme-dark .arqueo-cards-box {
    background: linear-gradient(180deg, #25293d, #22263a);
}

body.theme-dark .arqueo-card-group-label {
    color: #b5bfd8;
}

body.theme-dark .arqueo-fintech-card {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

body.theme-dark .arqueo-card-indicators button {
    background: #58607a;
}

body.theme-dark .arqueo-card-indicators button.is-active {
    background: #8a6fff;
}

body.theme-dark .arqueo-trend-filter,
body.theme-dark .arqueo-trend-more {
    background: #2a2f42;
    border-color: #4b536c;
    color: #dce2f3;
}

body.theme-dark .arqueo-trend-filter:hover,
body.theme-dark .arqueo-trend-filter:focus-visible,
body.theme-dark .arqueo-trend-more:hover,
body.theme-dark .arqueo-trend-more:focus-visible {
    background: #34405e;
    border-color: #6c7c9f;
    color: #ffffff;
}

body.theme-dark .arqueo-card-arrow {
    background: #2a2f42;
    border-color: #4b536c;
    color: #dce2f3;
}

body.theme-dark .arqueo-card-arrow:hover,
body.theme-dark .arqueo-card-arrow:focus-visible {
    background: #34405e;
    border-color: #6c7c9f;
    color: #ffffff;
}

body.theme-dark .arqueo-heatmap-row i {
    background: #4b5574;
    box-shadow: none;
}

body.theme-dark .arqueo-heatmap-row i.soft {
    background: #6677a5;
}

body.theme-dark .arqueo-heatmap-row i.muted {
    background: #3a425d;
}

body.theme-dark .wallet-action-btn:hover,
body.theme-dark .wallet-action-btn:focus-visible {
    background: #34405e;
    border-color: #6c7c9f;
    color: #ffffff;
}

body.theme-dark .segment-empty {
    background: #444b61;
}

@media (max-width: 991.98px) {
    .meseros-shell {
        flex-direction: column;
        padding: 0.8rem;
    }

    .arqueo-main {
        padding: 0.85rem;
    }

    .arqueo-title-block {
        font-size: 1.35rem;
    }

    .arqueo-kpi-value,
    .arqueo-money-value {
        font-size: 1.55rem;
    }

    .arqueo-chart-wrap {
        height: 230px;
    }

    .arqueo-cards-box {
        border-radius: 16px;
        padding: 0.7rem;
    }

    .arqueo-card-stack-clean {
        margin-bottom: 0;
        padding-right: 0.8rem;
    }

    .arqueo-fintech-card {
        border-radius: 14px;
        min-height: 150px;
        padding: 0.9rem 0.9rem 0.85rem;
    }

    .arqueo-fintech-card::after {
        right: -22px;
        width: 44px;
    }

    .arqueo-fintech-card-value {
        font-size: 1.6rem;
    }

    .wallet-action-btn {
        min-height: 42px;
        padding: 0.48rem 0.7rem;
        font-size: 0.82rem;
        border-radius: 12px;
    }

    .wallet-action-row {
        gap: 0.55rem !important;
    }

    .wallet-action-btn svg {
        width: 14px;
        height: 14px;
    }

    .arqueo-limit-bars {
        grid-template-columns: repeat(28, minmax(0, 1fr));
    }

    .limit-segment {
        height: 24px;
    }

    .arqueo-heatmap-row {
        grid-template-columns: 54px 1fr;
    }

    .arqueo-heatmap-row > span,
    .arqueo-heatmap-days {
        font-size: 0.68rem;
    }

    .arqueo-heatmap-row i {
        height: 24px;
        border-radius: 6px;
    }

    .arqueo-heatmap-days {
        grid-template-columns: 54px repeat(7, minmax(0, 1fr));
    }
}
