/* -------------------------------------------------------------------
 * software:   Futureverse - FuturEnergy Management System
 * version:    2.0.0
 * content:    Foglio di stile dashboard desktop
 * author:     Donato Poggi, 2026
 * license:    Proprietary - All rights reserved
 * owner:      © FuturEnergy Rinnovabile s.r.l.
 * framework:  © Aetheros PHP Framework by Donato Poggi
 * ------------------------------------------------------------------- */

/* =========================================================
   DASHBOARD WRAPPER
========================================================= */
.fv-dashboard {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
    min-height: 100%;
    padding: 12px 6px 6px 0;
}

/* =========================================================
   TOPBAR
========================================================= */
.fv-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 6px 4px 4px;
}

.fv-topbar-left {
    min-width: 0;
}

.fv-topbar-kicker {
    display: inline-block;
    margin-bottom: 10px;
    padding: 7px 14px;
    border: 1px solid rgba(93, 214, 255, 0.16);
    border-radius: 999px;
    background: rgba(93, 214, 255, 0.06);
    color: var(--fv-cyan);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fv-topbar-title {
    margin: 0 0 8px 0;
    font-size: 2.35rem;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.05;
    color: #ffffff;
}

.fv-topbar-subtitle {
    max-width: 760px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--fv-text-soft);
}

.fv-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}

/* =========================================================
   SEARCH BOX
========================================================= */
.fv-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 340px;
    height: 54px;
    padding: 0 18px;
    border: 1px solid rgba(148, 162, 255, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(31, 42, 78, 0.72) 0%, rgba(24, 35, 68, 0.72) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 8px 24px rgba(0, 0, 0, 0.14);
    color: var(--fv-text-soft);
}

.fv-search-box i {
    font-size: 0.95rem;
    opacity: 0.9;
}

.fv-search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
}

.fv-search-box input::placeholder {
    color: var(--fv-text-muted);
}

.fv-chat-trigger {
    min-width: 360px;
    justify-content: flex-start;
    cursor: pointer;
    transition:
        transform 0.20s ease,
        border-color 0.20s ease,
        box-shadow 0.20s ease;
}

.fv-chat-trigger span {
    color: var(--fv-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fv-chat-trigger-text {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.fv-chat-trigger-dots {
    display: inline-block;
    width: 1.2em;
    overflow: hidden;
    vertical-align: bottom;
}

.fv-chat-trigger-dots::before {
    content: "...";
    display: inline-block;
    animation: fv-chat-typing-dots 1.2s steps(4, end) infinite;
}

.fv-chat-trigger:hover,
.fv-chat-trigger:focus-visible,
.fv-chat-trigger[aria-expanded="true"] {
    transform: translateY(-1px);
    border-color: rgba(93, 214, 255, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 10px 28px rgba(0, 0, 0, 0.18),
        0 0 18px rgba(93, 214, 255, 0.08);
    outline: none;
}

@keyframes fv-chat-typing-dots {
    0% {
        width: 0;
    }
    100% {
        width: 1.2em;
    }
}

/* =========================================================
   ACTION BUTTON / DATE BOX
========================================================= */
.fv-icon-button,
.fv-date-box {
    height: 54px;
    border: 1px solid rgba(148, 162, 255, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(31, 42, 78, 0.72) 0%, rgba(24, 35, 68, 0.72) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 8px 24px rgba(0, 0, 0, 0.14);
    color: #ffffff;
}

.fv-icon-button {
    width: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        transform 0.20s ease,
        border-color 0.20s ease,
        box-shadow 0.20s ease;
}

.fv-icon-button:hover {
    transform: translateY(-1px);
    border-color: rgba(93, 214, 255, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 10px 28px rgba(0, 0, 0, 0.18),
        0 0 18px rgba(93, 214, 255, 0.08);
}

.fv-date-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    font-size: 0.94rem;
    color: var(--fv-text-main);
    white-space: nowrap;
}

/* =========================================================
   KPI GRID
========================================================= */
.fv-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.fv-kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 165px;
}

.fv-kpi-card::before {
    content: "";
    position: absolute;
    left: -30px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 77, 255, 0.12) 0%, transparent 72%);
    pointer-events: none;
}

.fv-kpi-card::after {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(93, 214, 255, 0.12) 0%, transparent 72%);
    pointer-events: none;
}

.fv-kpi-card-inner {
    position: relative;
    z-index: 1;
    padding: 22px 22px 20px 22px;
}

.fv-kpi-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.fv-kpi-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--fv-text-soft);
    line-height: 1.3;
}

.fv-kpi-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.fv-kpi-icon-blue {
    background: linear-gradient(135deg, rgba(47, 128, 255, 0.90), rgba(93, 214, 255, 0.60));
}

.fv-kpi-icon-violet {
    background: linear-gradient(135deg, rgba(123, 77, 255, 0.92), rgba(169, 109, 255, 0.62));
}

.fv-kpi-icon-cyan {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.88), rgba(93, 214, 255, 0.68));
}

.fv-kpi-icon-soft {
    background: linear-gradient(135deg, rgba(88, 109, 160, 0.88), rgba(122, 136, 192, 0.62));
}

.fv-kpi-value {
    margin-top: 20px;
    font-size: 2.35rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    color: #ffffff;
}

.fv-kpi-value-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 18px;
}

.fv-kpi-value-stack .fv-kpi-value {
    margin-top: 0;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.fv-kpi-number {
    display: inline-block;
}

.fv-kpi-unit {
    display: inline-block;
    margin-bottom: 0.38rem;
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--fv-text-soft);
}

.fv-kpi-value-small {
    font-size: 2rem;
}

.fv-kpi-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 0;
}

.fv-kpi-trend {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.fv-kpi-trend-up {
    color: #7df0c2;
    background: rgba(46, 211, 154, 0.12);
    border: 1px solid rgba(46, 211, 154, 0.20);
}

.fv-kpi-trend-warn {
    color: #ffd180;
    background: rgba(255, 179, 71, 0.12);
    border: 1px solid rgba(255, 179, 71, 0.20);
}

.fv-kpi-trend-ok {
    color: #a7f3d0;
    background: rgba(46, 211, 154, 0.12);
    border: 1px solid rgba(46, 211, 154, 0.20);
}

.fv-kpi-note {
    font-size: 0.86rem;
    color: var(--fv-text-soft);
}

.fv-kpi-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--fv-text-soft);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(93, 214, 255, 0.10);
    transition:
        color 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s ease;
}

.fv-kpi-link:hover {
    color: #ffffff;
    background: rgba(47, 128, 255, 0.16);
    border-color: rgba(93, 214, 255, 0.24);
    transform: translateX(2px);
}

/* =========================================================
   MAIN GRID / BOTTOM GRID
========================================================= */
.fv-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
}

.fv-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.fv-panel-large {
    min-height: 360px;
}

.fv-panel-medium {
    min-height: 290px;
}

.fv-panel-inner {
    padding: 24px;
}

.fv-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.fv-panel-title {
    margin: 0 0 6px 0;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.fv-panel-subtitle {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--fv-text-soft);
}

.fv-panel-filter,
.fv-panel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 162, 255, 0.14);
    color: var(--fv-text-main);
    font-size: 0.82rem;
    white-space: nowrap;
}

.fv-panel-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fv-panel-filter {
    cursor: pointer;
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease,
        transform 0.22s ease;
}

.fv-panel-filter:hover,
.fv-panel-filter:focus-visible {
    border-color: rgba(93, 214, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.fv-panel-filter-active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(47, 128, 255, 0.42) 0%, rgba(93, 214, 255, 0.22) 100%);
    border-color: rgba(93, 214, 255, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 18px rgba(47, 128, 255, 0.14);
}

/* =========================================================
   ACTIVITY LIST
========================================================= */
.fv-activity-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fv-activity-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    align-items: center;
    gap: 18px;
}

.fv-activity-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.fv-activity-desc {
    margin-top: 4px;
    font-size: 0.84rem;
    color: var(--fv-text-soft);
}

.fv-activity-progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fv-activity-progress {
    position: relative;
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.fv-activity-progress span {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fv-blue) 0%, var(--fv-cyan) 100%);
}

.fv-activity-progress-orange span {
    background: linear-gradient(90deg, #ffb347 0%, #ff8a3d 100%);
}

.fv-activity-progress-red span {
    background: linear-gradient(90deg, #ff6b6b 0%, #ff3b57 100%);
}

.fv-activity-percent {
    min-width: 42px;
    font-size: 0.84rem;
    color: var(--fv-text-soft);
}

.fv-activity-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.fv-activity-badge-action {
    cursor: pointer;
    transition:
        transform 0.20s ease,
        box-shadow 0.20s ease,
        filter 0.20s ease;
}

.fv-activity-badge-action:hover,
.fv-activity-badge-action:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    outline: none;
}

.fv-badge-blue {
    color: #9fe7ff;
    background: rgba(47, 128, 255, 0.18);
}

.fv-badge-orange {
    color: #ffd180;
    background: rgba(255, 179, 71, 0.16);
}

.fv-badge-green {
    color: #9ff1cf;
    background: rgba(46, 211, 154, 0.16);
}

.fv-badge-violet {
    color: #d0b3ff;
    background: rgba(123, 77, 255, 0.18);
}

/* =========================================================
   CHART MOCK
========================================================= */
.fv-chart-mock {
    position: relative;
    height: 295px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
    overflow: hidden;
}

.fv-chart-canvas-wrap {
    position: absolute;
    inset: 16px 16px 56px 16px;
    width: calc(100% - 36px);
    height: calc(100% - 72px);
}

#fvPortfolioChart {
    width: 100% !important;
    height: 100% !important;
}

.fv-chart-legend {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 0.82rem;
    color: var(--fv-text-main);
}

.fv-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: middle;
}

.fv-dot-blue {
    background: #3f7cff;
}

.fv-dot-violet {
    background: #9a63ff;
}

.fv-dot-cyan {
    background: #46d7ff;
}

.fv-dot-orange {
    background: #ffae57;
}

/* =========================================================
   SIMPLE LIST
========================================================= */
.fv-list-simple {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fv-list-item {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 14px;
}

.fv-list-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
}

.fv-list-icon-blue {
    background: linear-gradient(135deg, rgba(47, 128, 255, 0.90), rgba(93, 214, 255, 0.58));
}

.fv-list-icon-violet {
    background: linear-gradient(135deg, rgba(123, 77, 255, 0.90), rgba(169, 109, 255, 0.58));
}

.fv-list-icon-soft {
    background: linear-gradient(135deg, rgba(88, 109, 160, 0.90), rgba(122, 136, 192, 0.58));
}

.fv-list-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: #ffffff;
}

.fv-list-subtitle {
    margin-top: 4px;
    font-size: 0.83rem;
    color: var(--fv-text-soft);
}

.fv-list-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}

.fv-pill-blue {
    color: #a9e9ff;
    background: rgba(47, 128, 255, 0.16);
}

.fv-pill-orange {
    color: #ffd180;
    background: rgba(255, 179, 71, 0.16);
}

.fv-pill-violet {
    color: #dbb8ff;
    background: rgba(123, 77, 255, 0.16);
}

.fv-pill-red {
    color: #ffb2be;
    background: rgba(255, 107, 129, 0.16);
}

/* =========================================================
   DEADLINES
========================================================= */
.fv-deadline-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fv-deadline-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 14px;
}

.fv-deadline-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    min-height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 162, 255, 0.12);
}

.fv-deadline-day {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.fv-deadline-month {
    margin-top: 5px;
    font-size: 0.72rem;
    color: var(--fv-text-soft);
    letter-spacing: 0.08em;
}

.fv-deadline-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: #ffffff;
}

.fv-deadline-subtitle {
    margin-top: 4px;
    font-size: 0.83rem;
    color: var(--fv-text-soft);
}

/* =========================================================
   ACTIONS GRID
========================================================= */
.fv-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.fv-action-tile {
    min-height: 102px;
    padding: 18px 14px;
    border: 1px solid rgba(148, 162, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition:
        transform 0.20s ease,
        border-color 0.20s ease,
        background 0.20s ease;
}

.fv-action-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(93, 214, 255, 0.24);
    background: rgba(255, 255, 255, 0.06);
}

.fv-action-tile i {
    font-size: 1.1rem;
}

.fv-action-tile span {
    font-size: 0.86rem;
    font-weight: 500;
    text-align: center;
}

/* =========================================================
   CHAT DRAWER
========================================================= */
body.fv-chat-open {
    overflow: hidden;
}

.fv-chat-drawer {
    position: fixed;
    inset: 0;
    z-index: 1900;
    pointer-events: none;
}

.fv-chat-drawer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 24, 0.26);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.fv-chat-drawer.is-open {
    pointer-events: auto;
}

.fv-chat-drawer.is-open::before {
    opacity: 1;
}

.fv-chat-drawer-card {
    position: absolute;
    top: 32px;
    right: 32px;
    width: min(430px, calc(100vw - 44px));
    height: min(760px, calc(100vh - 64px));
    display: flex;
    flex-direction: column;
    padding: 22px;
    border-radius: 28px;
    border: 1px solid rgba(93, 214, 255, 0.14);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transform: translate3d(24px, -12px, 0);
    opacity: 0;
    transition:
        transform 0.24s ease,
        opacity 0.24s ease;
}

.fv-chat-drawer.is-open .fv-chat-drawer-card {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.fv-chat-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.fv-chat-drawer-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.fv-chat-drawer-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(47, 128, 255, 0.90), rgba(93, 214, 255, 0.60));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.fv-chat-drawer-title {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.fv-chat-drawer-subtitle {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--fv-text-soft);
}

.fv-chat-drawer-close {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 162, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--fv-text-main);
    cursor: pointer;
    transition:
        background 0.20s ease,
        border-color 0.20s ease,
        transform 0.20s ease;
}

.fv-chat-drawer-close:hover,
.fv-chat-drawer-close:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(93, 214, 255, 0.18);
    transform: translateY(-1px);
    outline: none;
}

.fv-chat-drawer-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    padding-right: 4px;
    overflow: auto;
}

.fv-chat-message {
    max-width: 88%;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 162, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.fv-chat-message p {
    margin: 0;
    color: var(--fv-text-main);
    line-height: 1.55;
}

.fv-chat-message-label {
    margin-bottom: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fv-cyan);
}

.fv-chat-message-assistant {
    align-self: flex-start;
    border-top-left-radius: 8px;
}

.fv-chat-message-user {
    align-self: flex-end;
    border-top-right-radius: 8px;
    background: linear-gradient(135deg, rgba(47, 128, 255, 0.18), rgba(93, 214, 255, 0.12));
}

.fv-chat-message-user .fv-chat-message-label {
    color: #b8d9ff;
}

.fv-chat-message-muted {
    background: rgba(255, 255, 255, 0.025);
}

.fv-chat-message-status {
    align-self: flex-start;
    max-width: none;
    padding: 0 4px;
    border: 0;
    background: transparent;
}

.fv-chat-message-status p {
    font-size: 0.82rem;
    color: var(--fv-text-soft);
}

.fv-chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-top: 18px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(148, 162, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.fv-chat-composer textarea {
    flex: 1;
    min-height: 76px;
    resize: none;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
    line-height: 1.55;
}

.fv-chat-composer textarea::placeholder {
    color: var(--fv-text-muted);
}

.fv-chat-composer-submit {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(93, 214, 255, 0.24);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(47, 128, 255, 0.92), rgba(93, 214, 255, 0.72));
    color: #ffffff;
    cursor: pointer;
    transition:
        transform 0.20s ease,
        box-shadow 0.20s ease,
        filter 0.20s ease;
}

.fv-chat-composer-submit:hover,
.fv-chat-composer-submit:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(47, 128, 255, 0.26);
    filter: brightness(1.03);
    outline: none;
}

.fv-chat-composer-submit:disabled {
    cursor: wait;
    opacity: 0.75;
    transform: none;
    box-shadow: none;
    filter: none;
}

.fv-chat-credit {
    margin-top: 10px;
    padding: 0 4px;
    font-size: 0.72rem;
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.48);
    text-align: center;
    opacity: 0.7;
    filter: drop-shadow(0 0 5px rgba(93, 214, 255, 0.12));
    user-select: none;
    pointer-events: none;
}

/* =========================================================
   MODAL
========================================================= */
body.fv-modal-open {
    overflow: hidden;
}

.fv-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(4, 10, 24, 0.72);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;
}

.fv-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fv-modal-card {
    width: min(1120px, 100%);
    max-height: min(86vh, 920px);
    overflow: auto;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(93, 214, 255, 0.14);
    background: linear-gradient(180deg, rgba(13, 24, 52, 0.98) 0%, rgba(10, 19, 42, 0.99) 100%);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.fv-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.fv-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fv-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fv-modal-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(47, 128, 255, 0.90), rgba(93, 214, 255, 0.60));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.fv-modal-icon-violet {
    background: linear-gradient(135deg, rgba(123, 77, 255, 0.92), rgba(169, 109, 255, 0.62));
}

.fv-modal-title {
    margin: 0 0 6px 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.fv-modal-subtitle {
    margin: 0;
    font-size: 0.92rem;
    color: var(--fv-text-soft);
}

.fv-modal-close {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 162, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--fv-text-main);
    cursor: pointer;
    transition:
        background 0.20s ease,
        border-color 0.20s ease,
        transform 0.20s ease;
}

.fv-modal-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(46, 211, 154, 0.20);
    border-radius: 14px;
    background: rgba(46, 211, 154, 0.10);
    color: #b7f6da;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.20s ease,
        border-color 0.20s ease,
        transform 0.20s ease;
}

.fv-modal-export:hover,
.fv-modal-export:focus-visible {
    background: rgba(46, 211, 154, 0.16);
    border-color: rgba(46, 211, 154, 0.30);
    transform: translateY(-1px);
    outline: none;
}

.fv-modal-close:hover,
.fv-modal-close:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(93, 214, 255, 0.18);
    transform: translateY(-1px);
    outline: none;
}

.fv-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fv-modal-section {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 162, 255, 0.10);
}

.fv-modal-section-head {
    margin-bottom: 14px;
}

.fv-modal-section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.fv-data-table-wrap {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid rgba(148, 162, 255, 0.10);
    background: rgba(9, 17, 35, 0.58);
}

.fv-data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.fv-data-table th,
.fv-data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 162, 255, 0.08);
    font-size: 0.88rem;
}

.fv-data-table th {
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.fv-data-table td {
    color: var(--fv-text-main);
}

.fv-data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.fv-data-table tfoot td {
    font-weight: 700;
    color: #ffffff;
    background: rgba(47, 128, 255, 0.08);
    border-bottom: 0;
}

/* =========================================================
   RESPONSIVE MINIMO
========================================================= */
@media (max-width: 1600px) {
    .fv-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fv-bottom-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1400px) {
    .fv-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .fv-topbar-right {
        justify-content: flex-start;
    }

    .fv-main-grid {
        grid-template-columns: 1fr;
    }

    .fv-activity-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
}

@media (max-width: 1100px) {
    .fv-bottom-grid,
    .fv-kpi-grid,
    .fv-actions-grid {
        grid-template-columns: 1fr;
    }

    .fv-list-item,
    .fv-deadline-item {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .fv-modal-overlay {
        padding: 18px;
    }

    .fv-modal-card {
        padding: 18px;
    }

    .fv-modal-head,
    .fv-modal-title-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 900px) {
    .fv-search-box {
        min-width: 100%;
    }

    .fv-chat-trigger {
        min-width: 100%;
    }

    .fv-chat-drawer-card {
        top: 14px;
        right: 14px;
        left: 14px;
        width: auto;
        height: calc(100vh - 28px);
        padding: 18px;
    }

    .fv-chat-drawer-title-wrap {
        align-items: flex-start;
    }

    .fv-chat-composer {
        padding: 12px;
    }

    .fv-chat-composer textarea {
        min-height: 64px;
    }

    .fv-date-box {
        width: 100%;
        justify-content: flex-start;
    }
}
