:root {
    --bg-main: #f8fafc;
    --card-glass: rgba(255, 255, 255, 0.65);
    --card-border: rgba(0, 0, 0, 0.05);
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --accent-indigo: #4f46e5;
    --accent-amber: #ea580c;
    --danger: #ef4444;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f1f5f9;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.1) 0px, transparent 50%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.4'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Blooms (Refined for Option A) */
body::before, body::after {
    content: '';
    position: fixed;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
    animation: move-blooms 40s infinite alternate linear;
}

body::before {
    background: radial-gradient(circle, var(--accent-indigo), transparent);
    top: -10%;
    left: -10%;
}

body::after {
    background: radial-gradient(circle, #7e22ce, transparent);
    bottom: -10%;
    right: -10%;
    animation-delay: -15s;
}

@keyframes move-blooms {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    padding: 2rem;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    height: calc(100vh - 4rem);
}

/* Floating Sidebar */
.sidebar {
    width: 280px;
    background: var(--card-glass);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 32px;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3.5rem;
    padding-left: 1rem;
}

.logo i {
    color: var(--accent-indigo);
    width: 28px;
    height: 28px;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-indigo) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    color: var(--text-muted);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.5rem;
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
    transform: translateX(5px);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-indigo);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.day-indicator {
    margin-top: auto;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(124, 58, 237, 0.05));
    border-radius: 28px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.day-indicator .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent-indigo);
    font-weight: 800;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.5rem;
}

.day-indicator h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
}

header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.welcome h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.welcome p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

.status-badge {
    background: var(--card-glass);
    backdrop-filter: blur(20px);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--accent-indigo);
}

/* Cards Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: min-content;
    gap: 1.5rem;
}

.card {
    background: var(--card-glass);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 32px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card.border-red { border-color: rgba(248, 113, 113, 0.3); box-shadow: 0 8px 32px rgba(248, 113, 113, 0.1); }
.card.border-violet { border-color: rgba(129, 140, 248, 0.3); box-shadow: 0 8px 32px rgba(129, 140, 248, 0.1); }

.text-red { color: var(--danger); }
.text-violet { color: var(--accent-indigo); }

.card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-header i {
    width: 22px;
    height: 22px;
}

/* List Items Scaling */
.list-item, .card-body li {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    list-style: none;
    transition: background 0.3s ease;
}

.list-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.item-subject {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-amber);
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.3rem;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.item-meta {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Tags */
.tag {
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.tag-red { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.tag-green { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.tag-violet { background: rgba(139, 92, 246, 0.1); color: #7c3aed; border: 1px solid rgba(139, 92, 246, 0.2); }
.tag-target { background: rgba(79, 70, 229, 0.1); color: var(--accent-indigo); border: 1px solid rgba(79, 70, 229, 0.2); }

/* Upcoming Section */
.span-full {
    grid-column: 1 / -1;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.sub-column h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-style: italic;
}

.error {
    color: var(--danger);
    padding: 2rem;
    text-align: center;
    background: rgba(248, 113, 113, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(248, 113, 113, 0.1);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
    .dashboard {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1.5rem;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem;
        flex-wrap: wrap;
    }
    .logo {
        margin-bottom: 0;
    }
    #main-nav {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    .nav-item {
        margin-bottom: 0;
        padding: 0.8rem 1rem;
    }
    .day-indicator {
        display: none; /* Hide large date indicator on top bar */
    }
    .main-content {
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .sidebar {
        flex-direction: column;
        gap: 1.5rem;
        border-radius: 24px;
    }
    #main-nav {
        justify-content: center;
        width: 100%;
    }
    .nav-item {
        flex: 1;
        justify-content: center;
    }
    .welcome h2 {
        font-size: 2rem;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
