/* Public/index.css */

/* --- Base Styles --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; display: flex; height: 100vh; background-color: #f9fafb; color: #333; overflow: hidden; }


/* --- Main Content Layout (Flex Column) --- */
.main-content { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
    overflow: hidden; /* Prevent body scroll */
}

/* --- Fixed Top Section (Header + Tiles) --- */
.dashboard-top-area {
    padding: 30px 30px 10px 30px;
    flex-shrink: 0; /* Don't shrink */
    background-color: #f9fafb;
    z-index: 10;
}

.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.header h2 { font-size: 28px; font-weight: 700; margin: 0; }
.btn-add { background-color: #2563eb; color: white; padding: 10px 20px; border: none; border-radius: 5px; font-weight: 600; cursor: pointer; }
.btn-add:hover { background-color: #1d4ed8; }

/* Dashboard Tiles */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 10px; }
.tile { 
    padding: 20px; border-radius: 8px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
    display: flex; flex-direction: column; justify-content: space-between; 
    cursor: pointer; transition: 0.2s; 
    border-left: 5px solid #ccc; 
    background-color: white; 
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.tile h3 { font-size: 14px; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; margin-top: 0; opacity: 0.8; }
.tile .count { font-size: 36px; font-weight: 700; color: #333; }

/* Tile Colors */
.tile-overdue { background-color: #fef2f2; border-left-color: #ef4444; }
.tile-overdue h3 { color: #b91c1c; }
.tile-overdue .count { color: #dc2626; }
.tile-current { background-color: #eff6ff; border-left-color: #3b82f6; }
.tile-current h3 { color: #1e40af; }
.tile-current .count { color: #2563eb; }
.tile-upcoming { background-color: #f0fdf4; border-left-color: #10b981; }
.tile-upcoming h3 { color: #15803d; }
.tile-upcoming .count { color: #16a34a; }
.tile-scheduled { background-color: #f3f4f6; border-left-color: #6b7280; }
.tile-scheduled h3 { color: #374151; }
.tile-scheduled .count { color: #4b5563; }

/* --- Scrolling Bottom Section (Activity) --- */
.activity-section-wrapper {
    flex-grow: 1; /* Fill remaining space */
    padding: 10px 30px 30px 30px;
    overflow: hidden; /* Prevent wrapper scroll */
    display: flex;
    flex-direction: column;
    min-height: 0; /* Crucial for nested flex scrolling */
}

.activity-card { 
    background: white; 
    border-radius: 8px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
    display: flex; 
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.activity-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.activity-header h3 { margin: 0; color: #333; font-size: 16px; font-weight: 700; }

/* The Scrollable List */
.activity-list { 
    flex-grow: 1;
    overflow-y: auto; /* SCROLL HAPPENS HERE */
    padding: 0 25px;
    list-style: none;
}

.activity-item { display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid #f9f9f9; }
.activity-item:last-child { border-bottom: none; }

.activity-icon { 
    width: 40px; height: 40px; background-color: #e0e7ff; color: #4f46e5; 
    border-radius: 50%; display: flex; justify-content: center; align-items: center; flex-shrink: 0; font-size: 18px;
}

.activity-content h4 { margin: 0 0 5px 0; font-size: 14px; font-weight: 600; color: #333; }
.activity-content p { margin: 0; font-size: 13px; color: #555; }
.activity-time { font-size: 11px; color: #999; margin-top: 4px; display: block; font-weight: 600; }

.empty-activity { text-align: center; color: #888; padding: 20px; }