:root {
    --bg-color: #f8fafc;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-sub: #64748b;
    --border-color: #e2e8f0;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Layout */
.app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Sidebar (Navigation) */
.sidebar {
    width: var(--sidebar-collapsed-width); /* Default collapsed */
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 50;
}
.sidebar:hover {
    width: var(--sidebar-width);
    box-shadow: 4px 0 24px rgba(0,0,0,0.05);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    text-decoration: none;
    padding-left: 6px;
    height: 40px;
}
.logo span { min-width: 24px; text-align: center; }

.nav-section {
    margin-bottom: 24px;
}
.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    color: #9ca3af;
    font-weight: 600;
    margin: 0 0 8px 12px;
    opacity: 0;
    transition: opacity 0.2s;
}
.sidebar:hover .nav-section-title { opacity: 1; }

.nav-item {
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: var(--text-sub);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    cursor: pointer;
    height: 40px;
}
.nav-item:hover, .nav-item.active {
    background-color: #eff6ff;
    color: var(--accent-color);
}
.nav-icon { 
    font-size: 18px; 
    min-width: 20px; 
    text-align: center;
    display: inline-block;
}
.nav-text { opacity: 0; transition: opacity 0.2s; }
.sidebar:hover .nav-text { opacity: 1; }

.project-list {
    overflow-y: auto;
    flex-grow: 1;
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.project-list::-webkit-scrollbar { display: none; }

/* Project dot in nav */
.nav-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    margin: 0 5px; /* Center in icon area */
}

/* Main Content */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 32px;
    width: 100%;
}
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* Typography & Components */
h1 { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* Status Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}
.badge-red { background: #fef2f2; color: #b91c1c; }
.badge-yellow { background: #fffbeb; color: #b45309; }
.badge-gray { background: #f3f4f6; color: #4b5563; }
.badge-blue { background: #eff6ff; color: #1d4ed8; }

/* Loading */
#loading {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; font-weight: 500; color: var(--text-sub);
}

/* Calendar Specific Styles */
.time-axis {
    display: grid;
    grid-template-rows: repeat(16, 60px); /* 7:00 - 22:00 */
    font-size: 12px;
    color: var(--text-sub);
    text-align: right;
    padding-right: 12px;
    margin-top: 10px;
}
.day-column {
    position: relative;
    background: #fff;
    border-left: 1px solid #f3f4f6;
    height: 960px; /* 16 hours * 60px */
}
.time-slot {
    height: 60px;
    border-bottom: 1px solid #f9fafb;
}
.event-block {
    position: absolute;
    left: 4px; right: 4px;
    background: #eff6ff;
    border-left: 3px solid var(--accent-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.free-time-block {
    position: absolute;
    left: 0; right: 0;
    background: repeating-linear-gradient(45deg, #f9fafb, #f9fafb 10px, #fff 10px, #fff 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

