/* Dashboard command center — visão executiva orientada ao período. */
.dashboard-command-page {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.dashboard-command-period {
    margin: 0;
}

.dashboard-command-summary,
.dashboard-command-panel {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(109, 40, 217, .11);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,255,255,.94));
    box-shadow: 0 18px 44px rgba(33,25,47,.065);
}

.dashboard-command-summary::before,
.dashboard-command-panel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    opacity: .86;
}

.dashboard-command-summary {
    padding: 22px;
    background:
        radial-gradient(circle at 4% 0%, rgba(249,115,22,.10), transparent 19rem),
        radial-gradient(circle at 98% 0%, rgba(109,40,217,.10), transparent 22rem),
        linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,255,255,.94));
}

.dashboard-command-summary__header,
.dashboard-command-panel__header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-command-summary__header {
    margin-bottom: 18px;
}

.dashboard-command-summary__header > div:first-child,
.dashboard-command-panel__header > div:first-child {
    min-width: 0;
}

.dashboard-command-summary h1,
.dashboard-command-panel h2 {
    margin: 8px 0 0;
    color: #1f1630;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.dashboard-command-summary h1 {
    font-size: clamp(1.25rem, 1.65vw, 1.72rem);
}

.dashboard-command-panel h2 {
    font-size: clamp(1.08rem, 1.3vw, 1.32rem);
}

.dashboard-command-summary p,
.dashboard-command-panel__header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
}

.dashboard-command-result {
    flex: 0 0 auto;
    min-width: 210px;
    padding: 12px 14px;
    border: 1px solid rgba(22,163,74,.15);
    border-radius: 17px;
    background: rgba(240,253,244,.84);
    text-align: right;
}

.dashboard-command-result.is-negative {
    border-color: rgba(220,38,38,.15);
    background: rgba(254,242,242,.86);
}

.dashboard-command-result span,
.dashboard-command-result strong {
    display: block;
}

.dashboard-command-result span {
    color: var(--muted);
    font-size: .74rem;
}

.dashboard-command-result strong {
    margin-top: 3px;
    color: #166534;
    font-size: 1.17rem;
    font-weight: 500;
    letter-spacing: -.025em;
}

.dashboard-command-result.is-negative strong {
    color: #b91c1c;
}

.dashboard-command-kpis {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-command-kpi {
    --kpi-color: var(--primary);
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "label icon"
        "value icon"
        "hint hint"
        "bar bar";
    align-content: start;
    gap: 5px 10px;
    min-height: 154px;
    padding: 16px;
    border: 1px solid rgba(109,40,217,.10);
    border-radius: 20px;
    background: rgba(255,255,255,.92);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.dashboard-command-kpi:hover,
.dashboard-command-kpi:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--kpi-color) 35%, transparent);
    box-shadow: 0 16px 34px rgba(33,25,47,.10);
    outline: none;
}

.dashboard-command-kpi--success { --kpi-color: #16a34a; }
.dashboard-command-kpi--expense { --kpi-color: #dc2626; }
.dashboard-command-kpi--pending { --kpi-color: #d97706; }
.dashboard-command-kpi--events { --kpi-color: #6d28d9; }

.dashboard-command-kpi__icon {
    grid-area: icon;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--kpi-color);
    background: color-mix(in srgb, var(--kpi-color) 10%, white);
    border: 1px solid color-mix(in srgb, var(--kpi-color) 15%, transparent);
}

.dashboard-command-kpi__icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-command-kpi__label {
    grid-area: label;
    min-width: 0;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.25;
}

.dashboard-command-kpi > strong {
    grid-area: value;
    min-width: 0;
    color: #1f1630;
    font-size: clamp(1.32rem, 1.75vw, 1.82rem);
    font-weight: 500;
    letter-spacing: -.045em;
    line-height: 1.08;
    overflow-wrap: normal;
}

.dashboard-command-kpi > small {
    grid-area: hint;
    min-height: 2.45em;
    color: var(--muted);
    font-size: .73rem;
    line-height: 1.35;
}

.dashboard-command-kpi > i {
    grid-area: bar;
    display: block;
    height: 7px;
    margin-top: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #eee9f4;
}

.dashboard-command-kpi > i > b {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    background: var(--kpi-color);
}

.dashboard-command-content {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
    gap: 16px;
    align-items: stretch;
}

.dashboard-command-panel {
    margin: 0;
    padding: 20px;
}

.dashboard-command-panel__header {
    margin-bottom: 14px;
}

.dashboard-command-list {
    display: grid;
    gap: 9px;
}

/* Eventos do dashboard: três cards por linha em desktop e tablet. */
.dashboard-command-list--events {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.dashboard-command-list--events .dashboard-command-event {
    min-height: 100%;
}

.dashboard-command-list--events .dashboard-command-event > div > strong {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dashboard-command-event,
.dashboard-command-reminder {
    display: grid;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(109,40,217,.10);
    border-radius: 17px;
    background: #fff;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.dashboard-command-event {
    grid-template-columns: 52px minmax(0, 1fr) 18px;
}

.dashboard-command-reminder {
    grid-template-columns: 42px minmax(0, 1fr) 18px;
}

.dashboard-command-event:hover,
.dashboard-command-event:focus-visible,
.dashboard-command-reminder:hover,
.dashboard-command-reminder:focus-visible {
    transform: translateX(2px);
    border-color: rgba(109,40,217,.22);
    box-shadow: 0 12px 28px rgba(33,25,47,.07);
    outline: none;
}

.dashboard-command-event time {
    display: grid;
    place-items: center;
    min-height: 52px;
    border-radius: 15px;
    background: #fff3eb;
    color: var(--primary-dark);
}

.dashboard-command-event time strong {
    font-size: 1.08rem;
    line-height: 1;
}

.dashboard-command-event time span {
    font-size: .7rem;
}

.dashboard-command-event > div,
.dashboard-command-reminder > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.dashboard-command-event > div > strong,
.dashboard-command-reminder > div > strong {
    color: #1f1630;
    font-size: .9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-command-event > div > span,
.dashboard-command-event > div > small,
.dashboard-command-reminder > div > small {
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.35;
}

.dashboard-command-event > div > small {
    width: fit-content;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(109,40,217,.08);
    color: var(--primary-dark);
}

.dashboard-command-reminder__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #d97706;
    background: #fff7e8;
}

.dashboard-command-reminder__icon svg,
.dashboard-command-empty svg,
.dashboard-command-row-arrow {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-command-reminder__icon svg {
    width: 20px;
    height: 20px;
}

.dashboard-command-row-arrow {
    width: 18px;
    height: 18px;
    color: #9a8da9;
}

.dashboard-command-empty {
    display: grid;
    place-items: center;
    min-height: 220px;
    padding: 24px;
    border: 1px dashed rgba(109,40,217,.18);
    border-radius: 18px;
    background: #fcfaff;
    text-align: center;
}

.dashboard-command-empty > span {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    border-radius: 16px;
    color: var(--primary);
    background: rgba(109,40,217,.08);
}

.dashboard-command-empty svg {
    width: 23px;
    height: 23px;
}

.dashboard-command-empty strong {
    color: #1f1630;
    font-size: .95rem;
    font-weight: 500;
}

.dashboard-command-empty p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .8rem;
}

@media (max-width: 1180px) {
    .dashboard-command-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-command-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-command-list--events {
        grid-template-columns: 1fr;
    }

    .dashboard-command-page {
        gap: 14px;
    }

    .dashboard-command-summary,
    .dashboard-command-panel {
        border-radius: 22px;
    }

    .dashboard-command-summary,
    .dashboard-command-panel {
        padding: 16px;
    }

    .dashboard-command-summary__header,
    .dashboard-command-panel__header {
        gap: 12px;
    }

    .dashboard-command-summary__header {
        display: grid;
        margin-bottom: 14px;
    }

    .dashboard-command-result {
        min-width: 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        text-align: left;
    }

    .dashboard-command-result strong {
        margin-top: 0;
        text-align: right;
    }

    .dashboard-command-kpis {
        gap: 10px;
    }

    .dashboard-command-kpi {
        min-height: 146px;
        padding: 13px;
        border-radius: 18px;
    }

    .dashboard-command-kpi__icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .dashboard-command-kpi > strong {
        font-size: clamp(1.08rem, 5.3vw, 1.42rem);
    }

    .dashboard-command-kpi > small {
        font-size: .69rem;
    }

    .dashboard-command-panel__header {
        align-items: center;
    }

    .dashboard-command-panel__header p {
        display: none;
    }

    .dashboard-command-panel__header .button {
        flex: 0 0 auto;
    }

    .dashboard-command-empty {
        min-height: 170px;
    }
}

@media (max-width: 360px) {
    .dashboard-command-kpis {
        grid-template-columns: 1fr;
    }

    .dashboard-command-kpi {
        min-height: 132px;
    }

    .dashboard-command-panel__header {
        align-items: flex-start;
    }

    .dashboard-command-panel__header .button {
        padding-inline: 10px;
    }
}

/* 2026-07-12 — filtro do dashboard compacto e discreto. */
.dashboard-command-period.dashboard-period-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    background-image: none;
    box-shadow: none;
}

.dashboard-command-period.dashboard-period-toolbar::before {
    display: none;
}

.dashboard-command-period .dashboard-period-filter {
    width: auto;
    min-width: 0;
    margin: 0;
}

.dashboard-command-period .period-filter-trigger {
    display: inline-grid;
    grid-template-columns: 16px minmax(0, auto) 14px;
    align-items: center;
    gap: 7px;
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(82, 55, 105, .14);
    border-radius: 11px;
    background: rgba(255, 255, 255, .88);
    color: #4d4058;
    box-shadow: 0 5px 14px rgba(33, 25, 47, .045);
    font-size: .76rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.dashboard-command-period .period-filter-trigger:hover,
.dashboard-command-period .period-filter-trigger:focus-visible,
.dashboard-command-period .dashboard-period-filter.is-open .period-filter-trigger {
    border-color: rgba(109, 40, 217, .30);
    background: #fff;
    color: #5d27b0;
    box-shadow: 0 7px 18px rgba(80, 42, 110, .08);
}

.dashboard-command-period .period-filter-trigger svg {
    width: 16px;
    height: 16px;
}

.dashboard-command-period .period-filter-chevron {
    width: 14px;
    height: 14px;
}

@media (max-width: 820px) {
    .dashboard-command-period.dashboard-period-toolbar {
        display: flex !important;
        justify-content: flex-end !important;
        gap: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
    }

    .dashboard-command-period .dashboard-period-filter,
    .dashboard-command-period .period-filter-field,
    .dashboard-command-period .dashboard-period-filter.is-open {
        position: static !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .dashboard-command-period .period-filter-trigger {
        display: inline-grid !important;
        grid-template-columns: 16px minmax(0, auto) 14px !important;
        gap: 7px !important;
        width: auto !important;
        max-width: min(100%, 280px) !important;
        min-height: 40px !important;
        padding: 0 10px !important;
        border-radius: 11px !important;
        font-size: 12px !important;
        text-align: left;
    }

    .dashboard-command-period .period-filter-trigger span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    .dashboard-command-period .period-filter-trigger {
        max-width: 100% !important;
        font-size: 11.5px !important;
    }
}

