.overview-section {
    margin: 0;
}

.overview-error-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.overview-welcome {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.overview-activity-message {
    margin: 0;
}

.overview-activity-meta {
    margin: 4px 0 0;
}

/* Typography rhythm */
.type-display {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin: 0;
}

.type-display-sm {
    font-size: clamp(1.75rem, 2.8vw, 2.125rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.type-heading {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0;
}

.type-body {
    font-size: 0.9375rem;
    line-height: 1.55;
    margin: 0;
}

.type-body-strong {
    font-size: 0.9375rem;
    font-weight: 650;
    line-height: 1.45;
    margin: 0;
}

.type-caption {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: 0;
}

.type-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0;
}

/* Surface system */
.surface-panel {
    border-radius: var(--radius-card);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.surface-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-4) 0;
}

.surface-panel-body {
    padding: var(--space-3) var(--space-4) var(--space-4);
}

.surface-panel {
    background: var(--bg-surface);
    box-shadow: 0 1px 2px rgba(15, 15, 20, 0.04), 0 10px 30px rgba(15, 15, 20, 0.04);
}

.surface-alert {
    background: linear-gradient(180deg, #FFF9F5 0%, #FFFFFF 72%);
    border-color: #FDEAD7;
}

.surface-panel-accent {
    background: linear-gradient(180deg, var(--brand-50) 0%, #FFFFFF 70%);
    border-color: #DDD6FE;
}

.surface-chart {
    background: linear-gradient(180deg, #FAFAFF 0%, #FFFFFF 65%);
    border-color: #E0E7FF;
}

.surface-quick {
    background: linear-gradient(180deg, #FAFAFF 0%, #FFFFFF 72%);
    border-color: #E0E7FF;
}

.surface-panel .app-empty-state {
    background: transparent;
    border: 0;
    padding: var(--space-5) var(--space-3);
}

.surface-panel .app-empty-icon {
    background: var(--brand-100);
    color: var(--brand-600);
}

.overview-attention-card .app-badge-lime {
    background: var(--brand-100);
    color: #4338CA;
}

.overview-attention-card .app-badge-warning {
    background: #FFF7ED;
    color: #C2410C;
}

.overview-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4338CA;
    background: var(--brand-100);
    white-space: nowrap;
}

.overview-source-badge.inline {
    vertical-align: middle;
}

/* Overview page */
.overview-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    max-width: 1280px;
}

.overview-page-enter {
    animation: overviewFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes overviewFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.overview-stagger > * {
    animation: overviewFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.overview-stagger > *:nth-child(1) { animation-delay: 0.04s; }
.overview-stagger > *:nth-child(2) { animation-delay: 0.08s; }
.overview-stagger > *:nth-child(3) { animation-delay: 0.12s; }
.overview-stagger > *:nth-child(4) { animation-delay: 0.16s; }

.overview-welcome-kicker {
    margin-bottom: 8px;
    color: var(--brand-600);
}

.overview-welcome-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.overview-welcome-dot { opacity: 0.45; }

.overview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-4);
}

.overview-kpi-sales { grid-column: span 3; }
.overview-kpi-profit { grid-column: span 4; }
.overview-kpi-orders { grid-column: span 2; }
.overview-kpi-stock { grid-column: span 3; }

.overview-metric {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    min-height: 188px;
    border-radius: 22px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.65);
    box-shadow: 0 1px 2px rgba(15, 15, 20, 0.03), 0 14px 36px rgba(15, 15, 20, 0.05);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
    overflow: hidden;
}

.overview-metric::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.55), transparent 55%);
    pointer-events: none;
}

.overview-metric:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12), 0 20px 44px rgba(15, 15, 20, 0.08);
    color: var(--text-main);
}

.overview-metric-hero {
    min-height: 204px;
    padding: 32px;
}

.overview-metric-hero .overview-metric-value {
    font-size: clamp(2rem, 3vw, 2.5rem);
}

.overview-metric-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.overview-metric-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.overview-metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,0.78);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.overview-metric-value {
    position: relative;
    z-index: 1;
}

.overview-metric-hint,
.overview-metric-spark {
    position: relative;
    z-index: 1;
}

.overview-metric-spark {
    margin-top: auto;
    height: 44px;
}

.overview-sparkline {
    width: 100%;
    height: 100%;
    display: block;
}

.overview-metric-indigo { background: linear-gradient(155deg, #EEF2FF 0%, #E0E7FF 48%, #F8FAFF 100%); }
.overview-metric-mint { background: linear-gradient(155deg, #ECFDF5 0%, #D1FAE5 48%, #F6FEF9 100%); }
.overview-metric-violet { background: linear-gradient(155deg, #F5F3FF 0%, #EDE9FE 48%, #FBFAFF 100%); }
.overview-metric-sky { background: linear-gradient(155deg, #EFF6FF 0%, #DBEAFE 48%, #F8FBFF 100%); }

.overview-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.overview-attention-list,
.overview-today-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.overview-attention-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-3);
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(253, 234, 215, 0.9);
    transition: transform 0.18s ease, background 0.18s ease;
}

.overview-attention-card:hover {
    transform: translateX(2px);
    background: #fff;
}

.overview-attention-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-600);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.overview-attention-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.overview-today-item {
    display: grid;
    grid-template-columns: 52px auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(221, 214, 254, 0.8);
    transition: background 0.18s ease;
}

.overview-today-item:hover { background: #fff; }

.overview-today-time {
    padding-top: 2px;
}

.overview-today-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-600);
}

.overview-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
}

.quick-action-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    justify-items: start;
    gap: 10px;
    min-height: 148px;
    padding: 22px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text-main);
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(255,255,255,0.95);
    box-shadow: 0 8px 24px rgba(15, 15, 20, 0.04);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.quick-action-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.14);
    color: var(--text-main);
    border-color: #C7D2FE;
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 15, 20, 0.06);
}

.quick-action-indigo .quick-action-icon { color: var(--brand-600); }
.quick-action-violet .quick-action-icon { color: #7C3AED; }
.quick-action-sky .quick-action-icon { color: #2563EB; }
.quick-action-mint .quick-action-icon { color: #059669; }

.quick-action-arrow {
    position: absolute;
    right: 18px;
    bottom: 18px;
    color: var(--text-secondary);
    transition: transform 0.18s ease, color 0.18s ease;
}

.quick-action-card:hover .quick-action-arrow {
    transform: translateX(3px);
    color: var(--brand-600);
}

.overview-chart-header {
    width: 100%;
    align-items: center;
}

.overview-chart-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.overview-chart-animate .overview-chart-line {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: chartDraw 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.overview-chart-animate .overview-chart-area {
    opacity: 0;
    animation: chartAreaIn 0.9s ease forwards 0.15s;
}

@keyframes chartDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes chartAreaIn {
    to { opacity: 1; }
}

.overview-chart-svg {
    width: 100%;
    height: 300px;
    display: block;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.45) 0%, rgba(255,255,255,0) 100%);
}

.overview-chart-gridline {
    stroke: rgba(107, 103, 128, 0.12);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.overview-chart-line {
    fill: none;
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
}

.overview-chart-line-revenue { stroke: var(--brand-600); }
.overview-chart-line-profit { stroke: #10B981; }

.overview-chart-dot {
    fill: #fff;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    transition: r 0.15s ease;
}

.overview-chart-dot-revenue { stroke: var(--brand-600); }
.overview-chart-dot-profit { stroke: #10B981; }

.overview-chart-dot:hover { r: 6; }

.overview-chart-labels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
    text-align: center;
}

.overview-chart-legend {
    display: flex;
    gap: var(--space-4);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.overview-chart-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: 6px;
    vertical-align: middle;
}

.overview-chart-legend-dot-revenue { background: var(--brand-600); }
.overview-chart-legend-dot-profit { background: #10B981; }

.overview-top-products { display: flex; flex-direction: column; gap: var(--space-2); }

.overview-product-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-3);
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.75);
    border: 1px solid var(--border-soft);
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.overview-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 15, 20, 0.06);
    color: var(--text-main);
}

.overview-product-rank {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--brand-100);
    color: var(--brand-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.overview-product-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.overview-product-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.overview-activity-message {
    margin: 0;
}

.overview-product-profit { font-weight: 800; color: #059669; white-space: nowrap; }
.overview-product-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.overview-activity-feed { display: flex; flex-direction: column; gap: var(--space-2); }

.overview-activity-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-3);
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--bg-page);
    border: 1px solid var(--border-soft);
    transition: background 0.18s ease;
}

.overview-activity-item:hover { background: #fff; }

.overview-activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-600);
}

.overview-welcome-skeleton { height: 96px; border-radius: 22px; }
.overview-metric-skeleton { height: 188px; border-radius: 22px; }
.overview-panel-skeleton { height: 300px; border-radius: 24px; }
.overview-chart-skeleton { height: 340px; border-radius: 24px; }
.overview-attention-skeleton,
.overview-event-skeleton,
.overview-product-skeleton,
.overview-activity-skeleton,
.overview-quick-skeleton { height: 72px; border-radius: 16px; margin-bottom: var(--space-2); }

@media (max-width: 1199.98px) {
    .overview-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-kpi-sales,
    .overview-kpi-profit,
    .overview-kpi-orders,
    .overview-kpi-stock { grid-column: span 1; }
    .overview-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .overview-kpi-grid,
    .overview-grid-two,
    .overview-quick-grid { grid-template-columns: 1fr; }

    .overview-attention-card { grid-template-columns: auto 1fr; }
    .overview-attention-cta { grid-column: 1 / -1; width: 100%; }
    .overview-chart-svg { height: 240px; }
}
