:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899;
    --secondary-hover: #db2777;
    --success-color: #10b981;
    --danger-color: #f43f5e;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --bg-color: #f0f9ff;
    --card-bg: #ffffff;
    --border-color: #e0e7ff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
    border-radius: 50%;
}

.header-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.header-subtitle {
    font-size: 1rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Tabs */
.tabs {
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tabs .container {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    border-bottom-color: var(--border-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn .icon {
    width: 1.25rem;
    height: 1.25rem;
}

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

.tab-content {
    display: none;
}

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

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

.section-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn .icon {
    width: 1.25rem;
    height: 1.25rem;
}

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

.btn-primary:hover {
    opacity: 0.9;
}

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

.btn-secondary:hover {
    opacity: 0.9;
}

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

.btn-success:hover {
    opacity: 0.9;
}

.btn-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.813rem;
}

.btn-icon {
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--text-primary);
}

.btn-icon.danger:hover {
    color: var(--danger-color);
}

.btn-icon.primary:hover {
    color: var(--primary-color);
}

/* Item List */
.item-list {
    display: grid;
    gap: 1rem;
}

.item-list.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.compact-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compact-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.compact-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.compact-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.compact-card-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.compact-actions {
    display: flex;
    gap: 0.25rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.empty-state .icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: var(--border-color);
}

.empty-state h3 {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Card */
.card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

.card-content {
    margin-top: 1rem;
}

/* Inventory Specific */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.quantity-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.2s;
}

.quantity-btn:hover {
    background: var(--border-color);
}

.quantity-btn .icon {
    width: 1rem;
    height: 1rem;
}

.quantity-display {
    font-size: 1.125rem;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.price-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 0.375rem;
}

.price-best {
    font-size: 0.875rem;
    font-weight: 600;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.price-best .icon {
    width: 1rem;
    height: 1rem;
}

.price-others {
    margin-top: 0.5rem;
    font-size: 0.813rem;
    color: var(--text-secondary);
}

.price-others span {
    margin-right: 0.75rem;
}

/* Recipe Specific */
.ingredients-list {
    list-style: none;
    margin-top: 0.75rem;
}

.ingredients-list li {
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Chore Specific */
.chore-card.completed {
    background: #f0fdf4;
    border-color: #86efac;
}

.chore-card.completed .card-title {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.completed-by {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #dcfce7;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #166534;
}

.member-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.member-btn {
    padding: 0.375rem 0.75rem;
    background: #dbeafe;
    color: #1e40af;
    border: none;
    border-radius: 9999px;
    font-size: 0.813rem;
    cursor: pointer;
    transition: all 0.2s;
}

.member-btn:hover {
    background: #bfdbfe;
}

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

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

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

.modal-close .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Form */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Price List in Form */
.price-list {
    list-style: none;
    margin-bottom: 1rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem;
    background: var(--bg-color);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.price-item span {
    font-weight: 500;
}

.add-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
}

/* Ingredient List in Form */
.ingredient-list {
    list-style: none;
    margin-bottom: 1rem;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    background: var(--bg-color);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.ingredient-name {
    flex: 1;
}

.ingredient-qty {
    width: 80px;
}

.ingredient-unit {
    width: 80px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.inventory-select {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}

.inventory-item {
    padding: 0.625rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.inventory-item:last-child {
    border-bottom: none;
}

.inventory-item:hover {
    background: #eff6ff;
}

.inventory-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inventory-item.disabled:hover {
    background: none;
}

/* Member List */
.member-list {
    list-style: none;
    margin-bottom: 1rem;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem;
    background: var(--bg-color);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

/* Calendar Styles */
.calendar-container {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.calendar-nav button {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.calendar-nav button:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-header {
    text-align: center;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.calendar-day {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: white;
}

.calendar-day:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
    box-shadow: var(--shadow);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    font-weight: 700;
}

.calendar-day.has-meals {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: var(--primary-color);
}

.calendar-day-number {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.calendar-meals-list {
    width: 100%;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meal-item {
    padding: 0.25rem 0.4rem;
    border-radius: 0.4rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meal-item.breakfast {
    background: rgba(251, 191, 36, 0.3);
    color: #92400e;
}

.meal-item.lunch {
    background: rgba(16, 185, 129, 0.3);
    color: #065f46;
}

.meal-item.dinner {
    background: rgba(99, 102, 241, 0.3);
    color: #312e81;
}

.meal-item.snack {
    background: rgba(236, 72, 153, 0.3);
    color: #831843;
}

/* Chore Status Sections */
.chores-sections {
    display: grid;
    gap: 2rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.25rem;
    border-radius: 9999px;
    box-shadow: var(--shadow);
}

.view-toggle button {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.view-toggle button.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
}

.chores-calendar-view {
    display: grid;
    gap: 1rem;
}

.chores-calendar-view .calendar-container {
    margin-bottom: 0;
}

.chores-calendar-view .calendar-day {
    min-height: 120px;
}

.chore-calendar-item {
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
    border-radius: 0.4rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
    cursor: pointer;
}

.chore-calendar-item.overdue {
    background: rgba(239, 68, 68, 0.3);
    color: #991b1b;
}

.chore-calendar-item.today {
    background: rgba(251, 191, 36, 0.3);
    color: #92400e;
}

.chore-calendar-item.upcoming {
    background: rgba(99, 102, 241, 0.3);
    color: #312e81;
}

.chore-calendar-item.completed {
    background: rgba(16, 185, 129, 0.3);
    color: #065f46;
    text-decoration: line-through;
}

.chore-section {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.chore-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.chore-section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.chore-section-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 1.25rem;
}

.chore-section.overdue .chore-section-icon {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.chore-section.today .chore-section-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.chore-section.upcoming .chore-section-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.chore-section.completed .chore-section-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.chore-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.chore-checkbox input[type="checkbox"] {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    accent-color: var(--success-color);
}

.chore-checkbox-wrapper {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.75rem;
    transition: background 0.2s;
}

.chore-checkbox-wrapper:hover {
    background: rgba(99, 102, 241, 0.1);
}

.chore-person-select {
    margin-left: 2.25rem;
    margin-top: 0.5rem;
}

/* Filter Bar */
.filter-bar {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-search {
    flex: 1;
    min-width: 250px;
}

.filter-select {
    min-width: 150px;
}

.filter-stats {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.stat-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    background: var(--gradient-primary);
    color: white;
}

/* Compact Filter Bar */
.filter-bar-compact {
    background: white;
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-search-compact {
    flex: 1;
    min-width: 150px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
}

.filter-search-compact input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.filter-select-compact {
    min-width: 100px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select-compact:hover {
    border-color: var(--primary-color);
}

.filter-select-compact:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-compact {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.btn-shopping:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.stat-badge-compact {
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--gradient-primary);
    color: white;
    min-width: 2.5rem;
    text-align: center;
}

.hide-mobile {
    display: inline;
}

@media (max-width: 640px) {
    .hide-mobile {
        display: none;
    }
    
    .filter-search-compact {
        min-width: 100%;
    }
    
    .filter-select-compact {
        min-width: auto;
        flex: 1;
    }
}


.icon {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.5rem;
    }
    
    .tabs .container {
        gap: 1rem;
    }
    
    .tab-btn {
        font-size: 0.813rem;
        padding: 0.875rem 0.25rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header-left {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
/* Household Switcher Button */
.household-switcher-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.household-switcher-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.household-switcher-btn .icon {
    width: 1.5rem;
    height: 1.5rem;
    stroke: white;
}

/* Household Cards */
.household-card {
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.household-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Filter Bar Improvements */
.filter-bar {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.filter-search input {
    padding-left: 2.5rem;
}

.filter-search::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 1;
}

.filter-select {
    min-width: 140px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-stats {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

.stat-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    white-space: nowrap;
}

/* Category Boxes for Ingredients */
.category-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.category-box {
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-color) 0%, white 100%);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.875rem;
}

.category-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.category-box.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

.category-box .emoji {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.25rem;
}

/* Ingredient Selection Improvements */
.ingredient-selection-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    background: var(--bg-color);
}

.inventory-select {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
}

.inventory-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
    font-size: 0.875rem;
}

.inventory-item:last-child {
    border-bottom: none;
}

.inventory-item:hover {
    background: linear-gradient(90deg, #eff6ff 0%, white 100%);
    padding-left: 1rem;
}

.inventory-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f9fafb;
}

.inventory-item.disabled:hover {
    background: #f9fafb;
    padding-left: 0.75rem;
}

/* Enhanced Chore Cards */
.compact-card.completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .household-switcher-btn {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .household-switcher-btn .icon {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .filter-bar {
        padding: 0.75rem;
    }
    
    .filter-search {
        min-width: 100%;
    }
    
    .category-boxes {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .category-box {
        padding: 0.75rem;
        font-size: 0.813rem;
    }
}

.household-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.household-switcher:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.household-switcher:active {
    transform: scale(0.97);
}

.household-switcher .icon {
    width: 16px;
    height: 16px;
}

/* PWA Install Button */
.pwa-install-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.2s;
    white-space: nowrap;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.pwa-install-btn:active {
    transform: translateY(0);
}

/* Calendar Menu Styles - Add to styles.css */

/* Calendar Menu Container */
.calendar-menu {
    min-height: 500px;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.view-toggle-mini {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-color);
    padding: 0.25rem;
    border-radius: 9999px;
}

.toggle-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.toggle-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

/* Month View */
.calendar-month-view {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
}

.month-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.month-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 200px;
    text-align: center;
}

.nav-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

.nav-btn:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.calendar-grid-compact {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.day-header {
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--primary-color);
    padding: 0.5rem;
}

.day-cell {
    aspect-ratio: 1;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    min-height: 70px;
}

.day-cell:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.day-cell.other-month {
    opacity: 0.3;
    background: #f9fafb;
}

.day-cell.today {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    font-weight: 700;
}

.day-cell.has-events {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: var(--primary-color);
}

.day-number {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.event-dots {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: auto;
}

.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.event-count {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* List View */
.events-list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.event-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

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

.event-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.event-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.event-info {
    flex: 1;
}

.event-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.event-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.event-actions {
    display: flex;
    gap: 0.25rem;
}

.event-description {
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.event-location {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.813rem;
}

.event-visibility {
    color: var(--primary-color);
    font-weight: 600;
}

.event-creator {
    color: var(--text-secondary);
}

/* Empty State */
.empty-state-mini {
    text-align: center;
    padding: 3rem 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-grid-compact {
        gap: 0.25rem;
    }
    
    .day-cell {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .day-number {
        font-size: 0.75rem;
    }
    
    .event-dots {
        gap: 0.15rem;
    }
    
    .event-dot {
        width: 4px;
        height: 4px;
    }
    
    .month-title {
        font-size: 1rem;
        min-width: 150px;
    }
}