/* QMINC Core Definitions & Styles */

:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --accent-primary: #00d4ff;
    --accent-secondary: #0ea5e9;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
}

/* Base Dashboard Container */
.dash-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Dashboard Header */
.dash-welcome {
    background: var(--card-bg);
    padding: 28px 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-welcome h1 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin: 0 0 6px;
    font-weight: 700;
}

.dash-welcome p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.dash-date {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* Cards Grid */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.dash-grid .dash-card {
    height: 230px;
    padding: 20px;
}

/* Individual Card */
.dash-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.dash-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.dash-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.dash-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dash-card-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
}

.dash-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.dash-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
    margin-top: auto;
}

.dash-card-link:hover {
    opacity: 0.8;
}

/* Calendar Card */
.calendar-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    grid-column: span 2;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 12px;
}

.cal-day-header {
    font-size: 11px;
    text-align: center;
    color: var(--text-muted);
    font-weight: 700;
    padding-bottom: 6px;
}

.cal-day {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.cal-day.today {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.15);
}

.cal-day.weekend {
    color: var(--text-muted);
}

.cal-day.other-month span {
    opacity: 0.35;
}

/* Kanban Dots */
.cal-kanban-dots {
    display: flex;
    gap: 2px;
    margin-top: 2px;
}

.kanban-dot {
    width: 5px;
    height: 5px;
    background: var(--accent-primary);
    border-radius: 50%;
}

/* Animations */
.kpi-card {
    animation: kpiSlideUp 0.5s ease-out both;
}

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

/* Specific KPI Layouts extracted from inline HTML */
.kpi-grid {
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 12px; 
    margin-bottom: 8px;
}

.kpi-card-header {
    font-size: 13px; 
    color: var(--text-main); 
    text-transform: uppercase; 
    font-weight: 800;
    letter-spacing: 0.5px;
}

.kpi-card-value {
    font-size: 24px; 
    font-weight: 800;
}

.kpi-card-suffix {
    font-size: 13px; 
    opacity: 0.7;
}

.kpi-card-desc {
    font-size: 11px; 
    opacity: 0.85;
    font-weight: 500;
}

.kpi-loading {
    padding: 16px; 
    grid-column: span 6; 
    text-align: center; 
    color: var(--text-muted); 
    font-size: 13px;
}

.dashboard-columns {
    display: grid; 
    grid-template-columns: 2fr 1fr; 
    gap: 16px;
}

.section-title {
    font-size: 12px; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-weight: bold; 
    margin-bottom: 12px; 
    display: flex; 
    align-items: center; 
    gap: 8px;
}

.calendar-sidebar {
    display: flex; 
    flex-direction: column; 
    height: 100%;
}

.calendar-widget {
    padding: 24px; 
    position: relative; 
    margin-top: 32px; 
    height: 476px; 
    display: flex; 
    flex-direction: column;
}

.calendar-widget-header {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-bottom: 12px; 
    flex-shrink: 0;
}

.calendar-widget-title {
    font-weight: 800; 
    font-size: 11px; 
    color: var(--text-main); 
    text-transform: uppercase;
}

.cal-day-inner {
    font-size: 10px; 
    position: relative;
}

.cal-day-events {
    position: absolute; 
    bottom: 6px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    align-items: center; 
    gap: 4px;
}

.event-dot-kanban {
    width: 6px; 
    height: 6px; 
    border-radius: 50%; 
    background: var(--accent-primary); 
    box-shadow: 0 0 4px rgba(0, 212, 255, 0.4); 
    display: block;
}

.event-dot-milestone {
    width: 6px; 
    height: 6px; 
    border-radius: 50%; 
    background: var(--accent-primary); 
    box-shadow: 0 0 4px rgba(0, 212, 255, 0.4); 
    display: block;
}

.event-dot-meeting {
    width: 7px; 
    height: 7px; 
    border-radius: 50%; 
    background: #22c55e; 
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5); 
    display: block;
}

.calendar-legend {
    margin-top: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    align-items: center;
}

.legend-row {
    display: flex; 
    justify-content: center; 
    gap: 24px;
}

.legend-item {
    display: flex; 
    align-items: center; 
    gap: 6px; 
    font-size: 11px; 
    color: var(--text-muted); 
    font-weight: 500;
}

.legend-dot-milestone {
    width: 6px; 
    height: 6px; 
    border-radius: 50%; 
    background: var(--accent-primary); 
    box-shadow: 0 0 4px var(--accent-primary);
}

.legend-dot-meeting {
    width: 6px; 
    height: 6px; 
    border-radius: 50%; 
    background: #22c55e; 
    box-shadow: 0 0 4px #22c55e;
}

.calendar-link {
    font-size: 10px; 
    color: var(--accent-primary); 
    text-decoration: none; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    font-weight: 700; 
    opacity: 0.8;
}

.calendar-link:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .calendar-card {
        grid-column: span 1;
    }
    .dash-welcome {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

.focus-card {
    background: rgba(0, 212, 255, 0.03); 
    border: 1px dashed rgba(0, 212, 255, 0.3); 
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}

.icon-primary {
    background: rgba(0, 212, 255, 0.1); 
    color: var(--accent-primary);
}

.text-primary {
    color: var(--accent-primary);
}

.mt-8 {
    margin-top: 8px;
}
