/* ===== AdsAssistant Design System (Soft SaaS) ===== */

/* --- Soft shadow utility --- */
.shadow-soft { box-shadow: 0 8px 30px rgb(0 0 0 / 0.04); }

/* --- Sidebar Navigation --- */
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #94a3b8; /* slate-400 */
    transition: all 0.15s ease;
}
.sidebar-nav a:hover {
    color: #e2e8f0; /* slate-200 */
    background: rgba(255,255,255,0.06);
}
.sidebar-nav a:hover svg {
    transform: translateX(1px);
}
.sidebar-nav a.nav-active {
    color: #ffffff;
    background: rgba(255,255,255,0.1);
    font-weight: 500;
}
.sidebar-nav a.nav-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: #10b981; /* emerald-500 */
}
.sidebar-nav a {
    position: relative;
}
.sidebar-nav svg {
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

/* --- Smooth transitions for HTMX swaps --- */
.htmx-settling { opacity: 0.8; transition: opacity 0.2s ease-in; }
.htmx-swapping { opacity: 0.5; transition: opacity 0.2s ease-out; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* --- Tabular numbers for data --- */
.tabular-nums { font-variant-numeric: tabular-nums; }

/* --- Card hover lift --- */
.card-hover { transition: box-shadow 0.2s ease, transform 0.2s ease; }
.card-hover:hover { box-shadow: 0 12px 40px rgb(0 0 0 / 0.06); transform: translateY(-1px); }

/* --- Health widget clickable --- */
.health-widget {
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.health-widget:hover {
    box-shadow: 0 12px 40px rgb(0 0 0 / 0.06);
    transform: translateY(-1px);
}
.health-widget .arrow-hint {
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}
.health-widget:hover .arrow-hint {
    opacity: 1;
    transform: translateX(0);
}

/* --- Todo item fade-out --- */
.todo-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.todo-item.dismissing {
    opacity: 0;
    transform: translateX(20px);
}

/* --- Chart tooltip --- */
.chart-tooltip {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 10px 14px;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    pointer-events: none;
}
.chart-tooltip .tt-label {
    color: #94a3b8;
    font-size: 11px;
    margin-bottom: 4px;
}
.chart-tooltip .tt-value {
    font-weight: 600;
    font-size: 14px;
}
.chart-tooltip .tt-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}
.chart-tooltip .tt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- Trend badge animation --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.trend-badge { animation: fadeInUp 0.3s ease forwards; }

/* --- Skeleton loader --- */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Date preset buttons --- */
.date-preset {
    transition: all 0.15s ease;
}
.date-preset.active {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

/* --- User menu dropdown --- */
.user-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
}
.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
