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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

.error {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
}

.password-hint {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 6px;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #333;
    font-size: 28px;
}

.logout-btn {
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

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

/* Roommates Section */
.roommates-section {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.roommates-section h3 {
    color: #333;
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.stat-name {
    font-weight: 600;
    font-size: 16px;
}

.stat-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

/* Planner */
.planner {
    display: grid;
    gap: 20px;
}

.week-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.week-card.current-week {
    border: 3px solid #27ae60;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.week-card.past-week {
    opacity: 0.7;
    background: #f8f9fa;
}

.week-card h2 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-badge {
    font-size: 14px;
    background: #27ae60;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.past-badge {
    font-size: 14px;
    background: #95a5a6;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    padding: 12px 30px;
    background: #f0f0f0;
    color: #555;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none !important;
}

.tab-content.active {
    display: block !important;
}

.chore-unassigned {
    color: #999;
    font-style: italic;
}

.chores-list {
    display: grid;
    gap: 15px;
}

.chore-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.chore-label {
    font-weight: 600;
    color: #555;
    flex: 1;
}

.chore-assigned {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chore-assigned strong {
    padding: 6px 12px;
    border-radius: 6px;
}

.chore-completed strong {
    color: #27ae60;
    background: #d5f4e6;
}

.chore-pending strong {
    color: #f39c12;
    background: #fef5e7;
}

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

.btn-complete:hover {
    background: #229954;
}

.assign-form {
    display: flex;
    gap: 8px;
}

.input-small {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
    background: white;
}

.input-small:focus {
    outline: none;
    border-color: #667eea;
}

select.input-small {
    cursor: pointer;
}

.btn-small {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-small:hover {
    background: #5568d3;
}

.btn-remove {
    background: #e74c3c;
    padding: 6px 12px;
}

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

/* Chore Breakdown */
.chore-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.breakdown-item {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.breakdown-item strong {
    display: block;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.breakdown-stat {
    display: inline-block;
    background: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    color: #555;
    margin-right: 8px;
    margin-top: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Independent Chores Section */
.independent-chores-section {
    background: white;
    padding: 25px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.independent-chores-section h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 22px;
}

.independent-chores-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.independent-chore-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
    color: white;
}

.independent-chore-card h4 {
    font-size: 20px;
    margin-bottom: 15px;
    color: white;
}

.independent-chore-card .assign-form {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.independent-chore-card .input-small {
    background: white;
    border: none;
    font-weight: 500;
}

.independent-chore-card .btn-small {
    background: white;
    color: #f5576c;
    font-weight: 700;
}

.independent-chore-card .btn-small:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.recent-completions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.recent-completions strong {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.completion-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    backdrop-filter: blur(5px);
}

/* Responsive */
@media (max-width: 768px) {
    .chore-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .assign-form {
        width: 100%;
    }
    
    .input-small {
        flex: 1;
        min-width: 0;
    }
}
