/* =========================================================
   MOCURVE SAAS — DASHBOARD
   ========================================================= */

.welcome-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 27px;
}

.welcome-section h2 {
    margin-bottom: 4px;
    font-size: clamp(24px, 3vw, 32px);
}

.welcome-section p:last-child {
    margin-bottom: 0;
    color: var(--color-text-secondary);
    font-size: 13px;
}

.period-selector {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 170px;
}

.period-selector > span {
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 700;
}

.period-selector button {
    display: flex;
    justify-content: space-between;
    min-width: 170px;
    padding: 9px 11px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 11px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.stat-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-card__label {
    color: var(--color-text-secondary);
    font-size: 11px;
    font-weight: 700;
}

.stat-card__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #f1f1ee;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 800;
}

.stat-card__icon--growth {
    background: var(--color-accent);
}

.stat-card__value {
    display: block;
    margin: 11px 0 7px;
    font-size: 29px;
    line-height: 1;
}

.stat-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    color: var(--color-text-muted);
    font-size: 10px;
}

.trend {
    font-weight: 800;
}

.trend--up {
    color: var(--color-success);
}

.chart-placeholder {
    display: flex;
    height: 238px;
    gap: 10px;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3px 0 25px;
    color: var(--color-text-muted);
    font-size: 9px;
}

.chart-area {
    position: relative;
    flex: 1;
    min-width: 0;
}

.chart-grid-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-border);
}

.chart-grid-line:nth-child(1) { top: 0; }
.chart-grid-line:nth-child(2) { top: 25%; }
.chart-grid-line:nth-child(3) { top: 50%; }
.chart-grid-line:nth-child(4) { top: 75%; }
.chart-grid-line:nth-child(5) { top: 100%; }

.chart-svg {
    position: absolute;
    inset: 0 0 24px;
    width: 100%;
    height: calc(100% - 24px);
    color: var(--color-primary);
    overflow: visible;
}

.chart-months {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    color: var(--color-text-muted);
    font-size: 9px;
}

.chart-legend {
    display: flex;
    gap: 18px;
    margin-top: 10px;
    color: var(--color-text-secondary);
    font-size: 10px;
}

.legend-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    vertical-align: middle;
}

.legend-dot--primary {
    background: var(--color-primary);
}

.legend-dot--secondary {
    border: 1px solid var(--color-text-muted);
}

.production-list {
    display: flex;
    flex-direction: column;
}

.production-item {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--color-border);
}

.production-item:last-child {
    border-bottom: 0;
}

.production-item__icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #f2f2ef;
    font-size: 12px;
    font-weight: 800;
}

.production-item__info strong,
.production-item__info span {
    display: block;
}

.production-item__info strong {
    font-size: 11px;
}

.production-item__info span {
    margin-top: 1px;
    color: var(--color-text-muted);
    font-size: 9px;
}

.production-item > strong {
    font-size: 15px;
}

.count-badge,
.completion {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.approval-list {
    display: flex;
    flex-direction: column;
    content-visibility: auto; /* Otimização de Performance Web */
    contain-intrinsic-size: 300px;
}

.approval-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.approval-item:last-child {
    border-bottom: 0;
}

.content-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, #dcdcd8, #8c8c87);
}

.content-thumb--two {
    background: linear-gradient(135deg, #222, #777);
}

.content-thumb--three {
    background: linear-gradient(135deg, #bcbcb5, #3a3a38);
}

.approval-item__info {
    min-width: 0;
}

.approval-item__info strong,
.approval-item__info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.approval-item__info strong {
    font-size: 10px;
}

.approval-item__info span {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: 9px;
}

.platform-stats {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 8px 0;
}

.platform-stat__top {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.platform-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--color-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.platform-stat__top strong,
.platform-stat__top > span:last-child {
    font-size: 11px;
}

.progress {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #ecece9;
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--color-primary);
}

.platform-stat small {
    display: block;
    margin-top: 6px;
    color: var(--color-text-muted);
    font-size: 9px;
}

.checklist-progress {
    margin-bottom: 14px;
}

.progress--large {
    height: 8px;
    margin-bottom: 7px;
}

.checklist-progress > span {
    color: var(--color-text-muted);
    font-size: 9px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.check-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    color: var(--color-text);
    font-size: 10px;
}

.check-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-item__box {
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border: 1px solid var(--color-border-strong);
    border-radius: 5px;
    background: var(--color-surface);
}

.check-item input:checked + .check-item__box {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.check-item input:checked + .check-item__box::after {
    width: 7px;
    height: 4px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    content: "";
    transform: rotate(-45deg) translate(1px, -1px);
}

.check-item--done > span:last-child {
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.payment-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 6px 0 22px;
}

.payment-summary__label {
    display: block;
    margin-bottom: 5px;
    color: var(--color-text-muted);
    font-size: 9px;
    font-weight: 700;
}

.payment-summary strong {
    display: block;
    font-size: 19px;
}

.payment-actions {
    display: flex;
    gap: 8px;
}

.payment-actions .button {
    flex: 1;
    padding: 0 10px;
    font-size: 10px;
}

.timeline {
    display: flex;
    flex-direction: column;
    content-visibility: auto; /* Otimização de Performance Web */
    contain-intrinsic-size: 200px;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 0 0 17px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:not(:last-child)::before {
    position: absolute;
    top: 14px;
    bottom: 0;
    left: 4px;
    width: 1px;
    background: var(--color-border);
    content: "";
}

.timeline-item__dot {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: 4px;
    border: 2px solid var(--color-surface);
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-border-strong);
}

.timeline-item strong,
.timeline-item span {
    display: block;
}

.timeline-item strong {
    font-size: 10px;
}

.timeline-item div > span {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: 9px;
}
