/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #9b59b6;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #848686;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #ffffff;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/clean.jpeg') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    z-index: -1;
}

/* ===================================
   Container & Layout
   =================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   Header
   =================================== */
.header {
    background: #000000;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding-left: 2rem;
}

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

.user-display {
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.user-display:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.user-display-avatar {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex: 0 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.user-display-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.user-display-name {
    display: inline-block;
    line-height: 1.2;
}

.nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    background: transparent;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

/* ===================================
   Main Content
   =================================== */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

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

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-header h2 {
    font-size: 2rem;
    color: #000000;
    text-shadow: none;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-success:hover {
    background: #27ae60;
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* ===================================
   Stats Grid
   =================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 3rem;
    line-height: 1;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* ===================================
   Section Cards
   =================================== */
.section-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.section-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 0.5rem;
}

/* ===================================
   Waste Bin
   =================================== */
.waste-bin-form {
    padding: 0;
}

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

.waste-bin-column {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.waste-bin-column-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.waste-bin-column-content {
    padding: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.waste-bin-entries {
    display: grid;
    gap: 1rem;
}

.waste-bin-entry {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.waste-bin-entry:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.waste-bin-stats {
    display: grid;
    gap: 0.75rem;
}

.waste-bin-stat-entry {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.waste-bin-stat-entry:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.waste-bin-entry-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #dfe6e9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waste-bin-entry-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Waste Bin Reminder Popup */
.waste-bin-reminder-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.waste-bin-reminder-overlay.active {
    opacity: 1;
}

.waste-bin-reminder-modal {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.waste-bin-reminder-overlay.active .waste-bin-reminder-modal {
    transform: scale(1);
}

.waste-bin-reminder-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.waste-bin-reminder-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.waste-bin-reminder-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.waste-bin-reminder-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.waste-bin-reminder-content {
    padding: 1.5rem;
}

.waste-bin-reminder-message {
    font-size: 1rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.waste-bin-reminder-list {
    display: grid;
    gap: 1rem;
}

.waste-bin-reminder-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--warning-color);
    transition: var(--transition);
}

.waste-bin-reminder-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.waste-bin-reminder-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--warning-color);
    min-width: 40px;
    text-align: center;
}

.waste-bin-reminder-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #dfe6e9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waste-bin-reminder-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.waste-bin-reminder-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.waste-bin-reminder-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-color);
}

.waste-bin-reminder-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--warning-color);
}

.waste-bin-reminder-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
}

.waste-bin-reminder-footer .btn {
    min-width: 150px;
}

@media (max-width: 576px) {
    .waste-bin-reminder-modal {
        width: 95%;
    }
    
    .waste-bin-reminder-header {
        padding: 1rem;
    }
    
    .waste-bin-reminder-header h3 {
        font-size: 1.1rem;
    }
    
    .waste-bin-reminder-content {
        padding: 1rem;
    }
    
    .waste-bin-reminder-rank {
        font-size: 1.2rem;
        min-width: 30px;
    }
    
    .waste-bin-reminder-avatar {
        width: 40px;
        height: 40px;
    }
}

.waste-bin-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
}

.waste-bin-entry-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.waste-bin-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.waste-bin-entry-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-color);
}

.waste-bin-entry-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    background: rgba(52, 152, 219, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.waste-bin-entry-date {
    font-size: 0.92rem;
    color: var(--gray-color);
}

/* ===================================
   Assignments Container
   =================================== */
.assignments-container {
    display: grid;
    gap: 1rem;
}

.assignment-item {
    background: var(--light-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.assignment-roommate {
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roommate-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
}

.assignment-tasks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.task-badge {
    background: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.task-badge.completed {
    background: var(--secondary-color);
    color: var(--white);
}

.task-badge.in-progress {
    background: var(--warning-color);
    color: var(--white);
}

/* ===================================
   Activity List
   =================================== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.activity-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray-color);
}

/* ===================================
   Filters
   =================================== */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 2px solid var(--white);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--dark-color);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===================================
   Tasks Grid
   =================================== */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.task-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.task-card.priority-high {
    border-top-color: var(--danger-color);
}

.task-card.priority-medium {
    border-top-color: var(--warning-color);
}

.task-card.priority-low {
    border-top-color: var(--secondary-color);
}

.task-card.status-completed {
    opacity: 0.7;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.task-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.task-tag {
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.task-tag.category {
    background: var(--info-color);
    color: var(--white);
}

.task-tag.priority {
    background: var(--light-color);
    color: var(--dark-color);
}

.task-tag.status {
    background: var(--gray-color);
    color: var(--white);
}

.task-tag.status-completed {
    background: var(--secondary-color);
}

.task-tag.status-in-progress {
    background: var(--warning-color);
}

.task-description {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.task-timestamps {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
}

.task-timestamp {
    font-size: 0.85rem;
    color: #2a2e32;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.task-timestamp:last-child {
    margin-bottom: 0;
}

.task-completion-time {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
}

.task-assigned {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===================================
   Roommates Grid
   =================================== */
.roommates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.roommate-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.roommate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.roommate-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    font-weight: 700;
}

.roommate-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.roommate-email {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.roommate-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.roommate-stat {
    text-align: center;
}

.roommate-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.roommate-stat-label {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.roommate-schedule {
    margin: 1rem 0;
    text-align: left;
}

.roommate-schedule h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--gray-color);
}

.schedule-days {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.day-badge {
    padding: 0.3rem 0.6rem;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 15px;
    font-size: 0.75rem;
}

.roommate-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* ===================================
   Charts
   =================================== */
.chart-container {
    min-height: 300px;
}

.chart-bar {
    margin-bottom: 1rem;
}

.chart-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.chart-bar-fill {
    height: 30px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.chart-bar-value {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0.5rem;
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
    transition: width 0.5s ease;
}

/* ===================================
   Stats Table
   =================================== */
.stats-table {
    overflow-x: auto;
}

.stats-table table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table th,
.stats-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light-color);
}

.stats-table th {
    background: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.stats-table tr:hover {
    background: var(--light-color);
}

/* ===================================
   Modal
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--light-color);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray-color);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger-color);
}

/* ===================================
   Forms
   =================================== */
form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.task-name-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.task-name-wrapper select {
    flex: 1;
}

.task-name-wrapper button {
    white-space: nowrap;
    flex-shrink: 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--light-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input[type="color"] {
    height: 50px;
    cursor: pointer;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-label:hover {
    background: #d5dbdb;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--light-color);
}

/* ===================================
   Photo Preview
   =================================== */
.photo-preview {
    margin-top: 1rem;
    display: none;
}

.photo-preview.active {
    display: block;
}

.photo-preview img {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* ===================================
   Notifications
   =================================== */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.notification {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease;
}

.info-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-left: 4px solid #2196f3;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease;
    font-size: 0.95rem;
    color: #1565c0;
}

.info-box .info-icon {
    font-size: 1.5rem;
    color: #2196f3;
    flex-shrink: 0;
}

.info-box .info-text {
    flex: 1;
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left: 4px solid var(--secondary-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification.info {
    border-left: 4px solid var(--primary-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* ===================================
   Empty State
   =================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-color);
    font-size: 1.1rem;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 15px;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 0;
    }

    .header-left {
        align-items: center;
        text-align: center;
    }

    .logo {
        font-size: 1.3rem;
        justify-content: center;
        margin-bottom: 0.25rem;
    }

    .current-date {
        padding-left: 0;
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .nav {
        justify-content: center;
        gap: 0.3rem;
    }

    .nav-btn {
        flex: 1;
        text-align: center;
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .main-content {
        padding: 1.5rem 0;
    }

    .view-header {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 1.5rem;
    }

    .view-header h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    .view-header .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-info h3 {
        font-size: 1.5rem;
    }

    .section-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .section-card h3 {
        font-size: 1.2rem;
    }

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

    .task-card {
        padding: 1.25rem;
    }

    .task-title {
        font-size: 1.1rem;
    }

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

    .roommate-card {
        padding: 1.25rem;
    }

    .roommate-avatar {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .filters {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-select {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .task-name-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .task-name-wrapper button {
        width: 100%;
    }

    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }

    .modal-header {
        padding: 1.25rem;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }

    form {
        padding: 1.25rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        min-height: 44px; /* Touch-friendly */
    }

    .btn-small {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-height: 40px;
    }

    .notification-container {
        left: 10px;
        right: 10px;
        top: 70px;
        max-width: none;
    }

    .notification {
        padding: 0.875rem 1.25rem;
    }

    .waste-bin-list {
        grid-template-columns: 1fr;
    }

    .waste-bin-column-content {
        max-height: 400px;
    }

    .assignment-item {
        padding: 1rem;
    }

    .activity-item {
        padding: 0.875rem;
    }

    .chart-bar {
        margin-bottom: 0.875rem;
    }

    .stats-table {
        font-size: 0.9rem;
    }

    .stats-table th,
    .stats-table td {
        padding: 0.75rem 0.5rem;
    }
    .waste-bin-entry {
        padding: 0.9rem 1rem;
        align-items: flex-start;
    }

    .waste-bin-entry-avatar {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.1rem;
    }

    .current-date {
        font-size: 0.75rem;
    }

    .nav-btn {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
    }

    .view-header h2 {
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: row;
        justify-content: flex-start;
    }

    .section-card {
        padding: 1.25rem;
    }

    .task-card,
    .roommate-card {
        padding: 1rem;
    }

    .task-actions,
    .roommate-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .task-actions .btn,
    .roommate-actions .btn {
        width: 100%;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    .roommate-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .schedule-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        margin: 0.5rem;
        border-radius: 12px;
    }

    .photo-preview img {
        max-height: 200px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-btn,
    .filter-select,
    input,
    textarea,
    select {
        min-height: 44px; /* iOS recommended touch target */
    }

    .modal-close {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .checkbox-label {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden {
    display: none !important;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .header,
    .nav,
    .btn,
    .modal,
    .notification-container {
        display: none !important;
    }

    body {
        background: white;
    }

    .main-content {
        padding: 0;
    }

    .section-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* Made with Bob */


/* ===================================
   Notification Styles
   =================================== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 400px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    transition: opacity 0.3s ease;
}

.notification-success {
    background-color: var(--secondary-color);
    color: white;
}

.notification-error {
    background-color: var(--danger-color);
    color: white;
}

.notification-info {
    background-color: var(--info-color);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================
   Status Badge Styles
   =================================== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-in-progress {
    background-color: #cfe2ff;
    color: #084298;
}

.status-completed {
    background-color: #d1e7dd;
    color: #0f5132;
}

/* ===================================
   Roommate Card Enhancements
   =================================== */
.roommate-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.roommate-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
}

.roommate-stats {
    color: var(--gray-color);
    font-size: 0.9em;
    margin-top: 5px;
}

/* ===================================
   Statistics Styles
   =================================== */
.stat-summary {
    padding: 20px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
}

.stat-summary p {
    margin: 10px 0;
    font-size: 1.1em;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.stats-table th,
.stats-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--light-color);
}

.stats-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.stats-table tr:hover {
    background-color: var(--light-color);
}

/* ===================================
   Button Enhancements
   =================================== */
.btn-small {
    padding: 6px 12px;
    font-size: 0.9em;
}

/* ===================================
   Photo Preview Styles
   =================================== */
.photo-preview {
    margin-top: 10px;
}

.photo-preview img {
    border: 2px solid var(--light-color);
}


/* ===================================
   Roommates Grid & Modern Card
   =================================== */
.roommates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.roommate-card-modern {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 1.75rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.roommate-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roommate-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
}

.roommate-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    text-transform: lowercase;
    margin: 0.25rem 0;
}

.roommate-summary-box {
    width: 100%;
    background: #e8ecee;
    border-radius: 12px;
    padding: 1.25rem 0.75rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.roommate-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.roommate-summary-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.roommate-summary-label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #7a7a7a;
    font-weight: 500;
}

.roommate-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.roommate-action-btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1200px) {
    .roommates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .roommates-grid {
        grid-template-columns: 1fr;
    }

    .roommate-card-modern {
        padding: 1.5rem 1.25rem;
    }

    .roommate-avatar-large {
        width: 90px;
        height: 90px;
    }

    .avatar-placeholder-large {
        font-size: 2rem;
    }

    .roommate-name {
        font-size: 1.3rem;
    }

    .roommate-summary-number {
        font-size: 1.75rem;
    }

    .roommate-action-btn {
        width: 100%;
    }
}


/* ===================================
   Recent Activity
   =================================== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.activity-item:hover {
    background: #e9ecef;
    border-left-color: var(--primary-color);
}

.activity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
}

.activity-content {
    flex: 1;
}

.activity-message {
    font-size: 1rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.activity-time {
    font-size: 0.85rem;
    color: var(--gray-color);
}


/* ===================================
   Detailed Task Card
   =================================== */
.task-card-detailed {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--primary-color);
    transition: var(--transition);
}

.task-card-detailed:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.task-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.task-badges {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.task-badge {
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.task-badge-category {
    background: #9b59b6;
    color: var(--white);
}

.task-badge-status {
    background: #95a5a6;
    color: var(--white);
}

.task-timestamps {
    background: #f8f9fa;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.task-created,
.task-updated {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.task-created-icon,
.task-updated-icon {
    font-size: 1.25rem;
}

.task-created-text,
.task-updated-text {
    font-size: 0.95rem;
    color: var(--dark-color);
    font-weight: 500;
}

.task-assigned-to {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.assigned-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
}

.assigned-text {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}

.task-card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-complete {
    background: #2ecc71;
    color: var(--white);
}

.btn-complete:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn-edit {
    background: #3498db;
    color: var(--white);
}

.btn-edit:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-delete {
    background: #e74c3c;
    color: var(--white);
}

.btn-delete:hover {
    background: #c0392b;
    transform: translateY(-2px);
}


/* ===================================
   Statistics Progress Bars
   =================================== */
.stat-bar-item {
    margin-bottom: 1.5rem;
}

.stat-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.stat-bar-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
}

.stat-bar-value {
    font-size: 0.9rem;
    color: var(--gray-color);
    font-weight: 500;
}

.stat-bar-container {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.stat-bar-fill {
    height: 100%;
    background: #3498db;
    border-radius: 15px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.stat-bar-gradient {
    background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
}

.stat-bar-count {
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
}

/* ===================================
   Modern Statistics Table
   =================================== */
.stats-table-modern {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.stats-table-modern thead {
    background: #f8f9fa;
}

.stats-table-modern th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid #e9ecef;
    font-size: 0.95rem;
}

.stats-table-modern td {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f5;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.stats-table-modern tbody tr:hover {
    background: #f8f9fa;
}

.table-roommate {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ===================================
   Task Completion Styles
   =================================== */
.task-completion-info {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 15px;
}

.completion-date {
    color: #155724;
    font-size: 14px;
    margin-bottom: 10px;
}

.completion-photo {
    margin: 10px 0;
}

.completion-photo img {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.completion-notes {
    color: #155724;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.task-badge-completed {
    background-color: var(--secondary-color) !important;
    color: white !important;
}

/* ===================================
   Compact Task Card Styles
   =================================== */
.task-card-compact {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border-top: 4px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.task-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.task-badges-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.badge-category {
    background-color: #9b59b6;
    color: white;
}

.badge-status {
    color: white;
}

.badge-pending {
    background-color: #95a5a6;
}

.badge-completed {
    background-color: #2ecc71;
}

.task-meta {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 12px;
}

.task-created-date {
    display: inline-block;
}

.task-assigned {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.assigned-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.assigned-avatar-image-small {
    object-fit: cover;
    display: block;
    overflow: hidden;
}

.task-completion-box {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.completion-header {
    color: #155724;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.completion-photo-box {
    margin: 10px 0;
}

.completion-photo-box img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.completion-notes-box {
    color: #155724;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
}

.task-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-task {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-complete {
    background-color: #2ecc71;
    color: white;
}

.btn-complete:hover {
    background-color: #27ae60;
}

.btn-edit {
    background-color: #3498db;
    color: white;
}

.btn-edit:hover {
    background-color: #2980b9;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}



/* ================= EXPENSE SPLITTING STYLES ================= */

.expense-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.expense-group-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.expense-group-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.expense-group-card.settled {
    opacity: 0.7;
    border-color: #27ae60;
}

.expense-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.expense-group-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.expense-group-badge {
    background: #27ae60;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.expense-group-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.expense-stat {
    flex: 1;
}

.expense-stat-label {
    font-size: 0.75rem;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.expense-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.expense-stat-value.amount {
    color: #e74c3c;
}

.balance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.balance-card.positive {
    background: linear-gradient(135deg, #306d68 0%, #000000 100%);
}

.balance-card.negative {
    background: linear-gradient(135deg, #78434a 0%, #000000 100%);
}

.balance-card.neutral {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
}

.balance-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.balance-user-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.balance-user-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.balance-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.balance-total {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.balance-total.positive {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.balance-total.negative {
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.balance-total.neutral {
    color: #ffffff;
}

.settlements-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.settlement-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 4px solid #3498db;
}

.settlement-card.suggested {
    border-left-color: #f39c12;
    background: linear-gradient(to right, #fff5e6 0%, white 100%);
}

.settlement-icon {
    font-size: 2rem;
}

.settlement-details {
    flex: 1;
}

.settlement-text {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.settlement-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #27ae60;
}

.settlement-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.settlement-action {
    display: flex;
    gap: 10px;
}

.expenses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.expense-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
}

.expense-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateX(4px);
}

.expense-category-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecf0f1;
    border-radius: 10px;
}

.expense-info {
    flex: 1;
}

.expense-description {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.expense-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.expense-amount-display {
    text-align: right;
}

.expense-amount-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e74c3c;
}

.expense-paid-by {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 4px;
}

.expense-actions {
    display: flex;
    gap: 8px;
}
/* Expense Split Details */
.expense-item-wrapper {
    margin-bottom: 15px;
}

.expense-item {
    cursor: pointer;
}

.expense-expand-icon {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 5px;
    transition: transform 0.3s ease;
}

.expense-splits-detail {
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
    padding: 15px;
    margin-top: -10px;
    border-top: 2px solid #e9ecef;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.splits-header {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.splits-list {
    display: grid;
    gap: 8px;
}

.split-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

.split-person {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 500;
}

.split-amount {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e74c3c;
}


.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    background: #e8f4f8;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    margin: 0;
    font-size: 0.95rem;
}

.expense-receipt-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.expense-receipt-thumb:hover {
    transform: scale(1.1);
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .expense-groups-grid {
        grid-template-columns: 1fr;
    }
    
    .balance-summary {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .expense-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .expense-amount-display {
        text-align: left;
        width: 100%;
    }
}


/* Custom split amounts styling */
.custom-split-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.custom-split-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.custom-split-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.custom-split-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.custom-split-checkbox label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

.custom-split-item input[type="number"] {
    width: 120px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.custom-split-item input[type="number"]:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.custom-split-item input[type="number"]:focus {
    border-color: #3498db;
    outline: none;
}

#split-total-display {
    padding: 10px;
    background: white;
    border-radius: 6px;
    text-align: center;
}

#split-total-display.valid {
    color: #27ae60;
    border: 2px solid #27ae60;
}

#split-total-display.invalid {
    color: #e74c3c;
    border: 2px solid #e74c3c;
}
