/* Custom radio button for setup wizard bonus points */
.bonus-mode-label {
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    font-size: 1.08em;
    user-select: none;
}
.bonus-mode-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.bonus-mode-label .custom-radio {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #4CAF50;
    border-radius: 50%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.bonus-mode-label input[type="radio"]:checked ~ .custom-radio {
    border-color: #4CAF50;
    background-color: #fff;
}
.bonus-mode-label .custom-radio:after {
    content: "";
    position: absolute;
    display: none;
}
.bonus-mode-label input[type="radio"]:checked ~ .custom-radio:after {
    display: block;
}
.bonus-mode-label .custom-radio:after {
    left: 4px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4CAF50;
    position: absolute;
}
/* Notification bubble for due date clock icon on chores */
.due-datetime-bubble {
    position: relative;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
}
.due-datetime-bubble i.fas.fa-clock {
    color: #fff;
    background: #ff3b3b;
    border-radius: 50%;
    font-size: 1em;
    width: 1.6em;
    height: 1.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,0.12);
    border: 2px solid #fff;
    position: relative;
    z-index: 2;
    animation: due-bounce 1.2s infinite cubic-bezier(.4,2,.6,1);
}
@keyframes due-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}
/* Amber highlight for chores with a due date */
.chore.has-due-date {
    background: rgba(74, 0, 0, 0.674);
    border: 2px solid rgb(7, 5, 0);
    box-shadow: 0 2px 12px rgba(225, 176, 41, 0.10);
}
/* Responsive styles for tablet and desktop modes */
@media (max-width: 1024px) and (min-width: 600px) {
    /* Tablet mode */
    .chore {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .chore > div:last-child {
        justify-content: flex-end;
        gap: 10px;
    }
    button {
        font-size: 1em;
        padding: 10px 18px;
    }
}

@media (min-width: 1025px) {
    /* Desktop mode */
    .chore {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    .chore > div:last-child {
        justify-content: flex-end;
        gap: 8px;
    }
    button {
        font-size: 1.1em;
        padding: 12px 28px;
    }
}
/* Sleek reward badge for points (matches action icon style) */
.chore-points-badge {
    display: inline-flex;
    align-items: center;
    background: #23272f;
    border-radius: 999px;
    padding: 6px 14px 6px 10px;
    font-weight: 700;
    font-size: 0.9em;
    color: #fbbf24;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.08);
    margin-left: 8px;
    margin-right: 0;
    border: 2px solid #fbbf24;
    min-width: 40px;
    min-height: 32px;
    gap: 4px;
    flex-shrink: 1; /* Allow shrinking when space is limited */
    white-space: nowrap; /* Keep text on one line */
    overflow: hidden; /* Hide any overflow text */
    text-overflow: ellipsis; /* Show ellipsis for overflow text */
}
.chore-points-badge i {
    font-size: 1.1em;
    color: #fbbf24;
    margin-right: 4px;
}
.chore-points-value {
    color: #fff;
    font-size: 1.1em;
    font-weight: 700;
    margin-left: 2px;
}

/* Responsive adjustments for chore points badge */
@media (max-width: 768px) {
    .chore-points-badge {
        font-size: 0.8em;
        padding: 4px 8px 4px 6px;
        min-width: 32px;
        min-height: 26px;
        margin-left: 4px;
    }
    .chore-points-badge i {
        font-size: 0.9em;
    }
    .chore-points-value {
        font-size: 0.9em;
    }
    
    .chore {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .chore > div:first-child {
        gap: 4px;
    }
}
/* Import Lato font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* Enhanced Rewards Section Styles */
.rewards-section {
    padding: 2rem;
    margin: 2rem;
    background: var(--section-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    color: var(--text-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: rgba(var(--text-color), 0.6);
}

.empty-state p {
    font-size: 1.2em;
    margin: 0.5rem 0;
}

.empty-state .subtitle {
    font-size: 1em;
    opacity: 0.7;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.reward-card {
    background: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(var(--text-color), 0.1);
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.reward-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.reward-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reward-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.reward-points-badge {
    display: inline-flex;
    align-items: center;
    background: #23272f;
    border-radius: 999px;
    padding: 6px 14px 6px 10px;
    font-weight: 700;
    font-size: 1em;
    color: #fbbf24;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.08);
    margin-left: 8px;
    margin-right: 0;
    border: 2px solid #fbbf24;
    min-width: 44px;
    min-height: 36px;
    gap: 4px;
}

.reward-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.reward-icon-large {
    font-size: 3em;
    margin-bottom: 1rem;
}

.reward-content {
    padding: 1.5rem;
}

.reward-title-modern {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.reward-description {
    color: rgba(var(--text-color), 0.8);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.reward-meta {
    margin-bottom: 1.5rem;
}

.reward-assignee {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assignee-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--text-color);
}

.assignee-name {
    font-weight: 600;
    color: var(--text-color);
}

.reward-actions-modern {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-redeem, .btn-delete {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-redeem:hover {
    background: var(--button-success-hover);
    transform: scale(1.05);
}

.btn-delete {
    background: var(--button-danger);
    color: white;
    padding: 0.75rem;
}

.btn-delete:hover {
    background: var(--button-danger-hover);
    transform: scale(1.05);
}

/* Modern Form Styles */
.add-rewards-modern {
    padding: 2rem;
    margin: 2rem;
    background: var(--section-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.modern-input, .modern-textarea, .modern-select {
    padding: 1rem;
    border: 1px solid rgba(var(--text-color), 0.2);
    border-radius: var(--border-radius);
    background: var(--background-color);
    color: var(--text-color);
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.modern-input:focus, .modern-textarea:focus, .modern-select:focus {
    outline: none;
    border-color: var(--button-background);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modern-textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-primary {
    background: var(--button-background);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
    background: rgba(var(--text-color), 0.1);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(var(--text-color), 0.2);
    border-radius: var(--border-radius);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(var(--text-color), 0.2);
}

.reward-suggestions-container {
    margin-bottom: 2rem;
}

.suggestion-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .rewards-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .suggestion-controls {
        flex-direction: column;
        align-items: stretch;
    }
}


:root {
    --background-color: #0f172a;
    --text-color: #f1f5f9;
    --header-background: #111827;
    --header-text: #f1f5f9;
    --section-background: #1e293b;
    --button-background: #6366f1;
    --button-hover: #4f46e5;
    --button-danger: #ef4444;
    --button-danger-hover: #b91c1c;
    --button-success: #10b981;
    --button-success-hover: #059669;
    --border-radius: 14px;
    --box-shadow: 0 4px 24px rgba(30, 41, 59, 0.12);
    --spacing-unit: 14px;
    --pencil-icon-color: #6366f1;
    --rewards-icon-color: #10b981;
    --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Dark Mode Overrides using CSS variables */
[data-theme="dark"] {
    --background-color: #121212;
    --text-color: #ffffff;
    --section-background: #1e1e1e;
    --button-background: #333333;
    --button-hover: #444444;
    --pencil-icon-color: #292929; /* Pencil icon color in dark mode */
    --rewards-icon-color: #6abf6e; /* Dark mode rewards icon color */
    --icon-bg-dark: rgba(255,255,255,0.08); /* Subtle icon background for dark mode */
    --color-picker-container: #333333;
}

/* Base Styles */
body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
}

/* Ensure all headings and text use Lato */
h1, h2, h3, h4, h5, h6, p, span, div, input, button, select, textarea, label, table, th, td, a {
    font-family: var(--font-family) !important;
}

.delete-person-btn svg {
  display: block !important;
}

/* Header Styles */
header {
    background-color: var(--header-background);
    color: var(--header-text);
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px; /* Added margin for better spacing */
}

.logo {
    width: 245px;
    height: auto;
    display: block; /* Ensure logo is block-level */
    margin: 0 auto; /* Center the logo */
}

/* Navigation Styles */
nav {
    background-color: var(--header-background);
    color: var(--header-text);
    padding: 10px;
    text-align: center;
}

nav a {
    color: var(--header-text);
    text-decoration: none;
    margin: 0 var(--spacing-unit);
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ddd;
}

/* Section Styles */
section {
    padding: 25px;
    margin: 20px;
    background: var(--section-background, #000000);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Typography */
h2 {
    font-size: 2.2em;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase; /* Added for a more professional look */
    letter-spacing: 1px; /* Subtle letter spacing */
}

h3 {
    margin-top: 0;
    font-size: 1.5em; /* Adjusted size */
    color: var(--text-color);
    font-weight: 600; /* Slightly bolder */
}

/* Points Display */
.points-display {
    font-size: 1.1em;
    color: inherit;
    margin: 5px 0;
    font-weight: 500; /* Adjusted font weight */
}

/* Avatar Styles */
.avatar-container {
    text-align: center;
    margin-bottom: var(--spacing-unit);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--text-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease; /* Added transition */
}

.avatar:hover {
    transform: scale(1.1); /* Slight scale on hover */
}

/* Action Icons */
.action-icons {
    position: absolute;
    top: var(--spacing-unit);
    right: var(--spacing-unit);
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

/* Style for icons with shadow */
.action-icons i,
.custom-file-upload,
.colorpicker {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    border-radius: 5px; /* Match other elements */
    padding: 3px; /* Add some padding around the icon */
    background-color: rgba(255, 255, 255, 0.1); /* Optional: Add a very subtle background */
}
[data-theme="dark"] .action-icons i,
[data-theme="dark"] .custom-file-upload,
[data-theme="dark"] .colorpicker {
    background-color: var(--icon-bg-dark) !important;
    color: #fff !important;
}

/* File Upload Styles */
.avatar-upload-form {
    margin-top: var(--spacing-unit);
}

.avatar-upload-form input[type="file"] {
    display: none;
}

.custom-file-upload,
.colorpicker {
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    width: 30px;
    height: 30px;
    position: relative;
}

.custom-file-upload:hover,
.colorpicker:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.custom-file-upload i,
.colorpicker i {
    font-size: 16px;
    padding: 5px;
    border-radius: 5px;
    color: var(--pencil-icon-color);
}

.colorpicker .color-input {
    position: absolute;
    width: 26px;
    height: 26px;
    opacity: 0;
    cursor: pointer;
}

/* Tooltip styles */
.custom-file-upload::after,
.colorpicker::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--header-background);
    color: var(--header-text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.custom-file-upload:hover::after,
.colorpicker:hover::after {
    opacity: 1;
    bottom: calc(100% + 4px);
}

/* Chore Styles */
.chore {
    background-color: var(--background-color);
    padding: 12px 15px;
    margin-bottom: var(--spacing-unit);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    transition: transform 0.2s ease;
    position: relative; /* For points circle */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
    overflow: hidden; /* Prevent content overflow */
}

/* Ensure chore content area handles text properly */
.chore > div:first-child {
    flex: 1;
    min-width: 0; /* Allow flex item to shrink below content size */
    overflow-wrap: break-word; /* Break long words if needed */
    word-wrap: break-word; /* Fallback for older browsers */
    overflow: hidden; /* Prevent content overflow */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

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

/* Updated style for points circle to look like iPhone notification badge with purple color */
.chore-points-circle {
 position: absolute;
 top: -16px;
 right: -16px;
 background-color: #c375df;
 color: white;
 width: 40px;
 height: 40px;
 padding: 0;
 border-radius: 50%;
 display: flex;
 flex-direction: column; /* Stacks the content vertically */
 align-items: center; /* Horizontally centers content within the column */
 justify-content: center; /* Vertically centers content within the circle */
 font-weight: 700;
 font-size: .9em;
 box-shadow: 0 0 6px rgb(255, 255, 255);
 user-select: none;
 pointer-events: none;
 white-space: nowrap;
 transition: transform 0.3s ease;
 z-index: 10;
}

.chore-points-circle:hover {
 transform: scale(1.5);
}

.chore-points-circle::after {
 content: "points";
 font-size: 0.3em;
 line-height: 1; /* Set this to a value that looks good, like 1 or less */
 margin-top: 1px; /* Add a negative top margin to pull it up */
 text-transform: uppercase;
 font-weight: 600;
}

/* Button Styles */
button {
    background: var(--button-background);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    max-width: 100%;
    white-space: nowrap;
}
/* Ensure the button container inside .chore doesn't overflow and aligns buttons properly */
.chore > div:last-child {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}
button:hover, button:focus {
    background: var(--button-hover);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.13);
    transform: translateY(-2px) scale(1.04);
}
.button-danger, .delete-chore-btn, .delete-reward-btn {
    background: var(--button-danger) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}
.button-danger:hover, .delete-chore-btn:hover, .delete-reward-btn:hover {
    background: var(--button-danger-hover) !important;
}
.button-success, .complete-reward-btn {
    background: var(--button-success) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}
.button-success:hover, .complete-reward-btn:hover {
    background: var(--button-success-hover) !important;
}

/* Theme Toggle Styles */
.theme-toggle-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    background-color: var(--button-background);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--button-hover);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--text-color);
    transition: opacity 0.3s ease;
}

/* Chore Section Styles */
.chores-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

/* Incomplete Chores Styles */
.incomplete-chores-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    list-style: none;
    padding: 0;
}

.incomplete-chore-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background-color: #fffbe6; /* Light yellow background */
    border: 1px solid #f0e68c;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.2s ease;
}

.incomplete-chore-item button {
    margin-left: 5px;
    padding: 5px 8px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
}

/* Completed Chores Styles */
.completed-chores-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.completed-chore-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: rgba(144, 238, 144, 0.15); /* More transparent green background for completed chores */
    border: 1px solid #90ee90;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    margin: 4px 0;
}

/* Style for icons with shadow */
.action-icons i,
.custom-file-upload,
.colorpicker {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    border-radius: 5px; /* Match other elements */
    padding: 3px; /* Add some padding around the icon */
    background-color: rgba(255, 255, 255, 0.1); /* Optional: Add a very subtle background */
}

.daily-chore-indicator {
    margin-right: 5px;
}

.chore i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.chore {
    background: #111827;
    padding: 18px 20px;
    margin-bottom: var(--spacing-unit);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.13);
    color: var(--text-color);
    transition: box-shadow 0.18s, transform 0.18s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.chore:hover {
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.13);
    transform: translateY(-2px) scale(1.01);
}


.chore-points {
    color: rgba(var(--text-color), 0.6);
}

.completion-status {
    color: #4CAF50;
    font-weight: bold;
    margin: 0 5px;
}

.completion-date {
    font-size: 0.8em;
    color: #666;
    width: 100%;
    margin-top: 5px;
}

.chore button {
    margin-left: 5px;
    padding: 3px 8px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
}

.chore button:hover {
    opacity: 0.8;
}

/* Color picker styling */
.color-picker-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.color-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-picker-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--text-color);
    transition: color 0.2s, transform 0.2s;
}

.color-picker-btn:hover {
    color: #007bff;
    transform: scale(1.1);
}

/* Completed rewards styles */
.completed-rewards {
    margin-top: 2rem;
    padding: 2rem;
    background-color: var(--section-background);
    border-radius: 10px;
}

.completed-rewards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
}

.completed-reward-item {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 300px;
    transition: transform 0.3s ease; /* Added transition */
}

.completed-reward-item:hover {
    transform: scale(1.03); /* Slight scale on hover */
}

.completed-reward-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.completed-reward-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.redeemer-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--text-color);
}

.completed-status {
    color: #4CAF50;
    font-weight: bold;
}

/* Complete button styling */
.complete-reward-btn {
    background: #4CAF50;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .reward-progress-bar-fill {
        height: 100%;
        background: linear-gradient(90deg, #e53935 0%, #ffd700 50%, #4CAF50 100%);
        border-radius: 8px 0 0 8px;
        transition: width 0.5s cubic-bezier(.4,2,.6,1);
.delete-chore-btn,
.delete-reward-btn {
    background-color: #f44336;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s ease;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-chore-btn:hover,
.delete-reward-btn:hover {
    background-color: #d32f2f;
    transform: scale(1.05);
}

/* Adjust the icon size and alignment */
.delete-chore-btn i,
.delete-reward-btn i,
.complete-reward-btn i {
    font-size: 1em;
    margin: 0;
}

/* Kanban Layout */
#kanban {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.column {
    background-color: var(--section-background);
    border: 1px solid #504848;
    border-radius: var(--border-radius);
    padding: 10px;
    width: 23%;
    text-align: center;
    position: relative;
    color: var(--text-color);
    transition: box-shadow 0.3s ease; /* Added transition */
    overflow: hidden; /* Hide both horizontal and vertical overflow */
    box-sizing: border-box; /* Include padding in width calculation */
}

.column:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow on hover */
}

/* Person-specific column colors */
.column[data-person="Dad"] {
    background-color: #87CEEB;
}

.column[data-person="Charlotte"] {
    background-color: #FFB6C1;
}

.column[data-person="William"] {
    background-color: #90EE90;
}

.column[data-person="Mum"] {
    background-color: #BA55D3;
}

/* Force black color for person names and points */
.column[data-person="Dad"],
.column[data-person="Charlotte"],
.column[data-person="William"],
.column[data-person="Mum"] {
    color: #000000;
}

/* Weekly Summary Section Styles */
#weekly-summary {
    background-color: var(--section-background);
    color: var(--text-color);
    padding: 20px;
    margin-top: 20px;
    border-top: 2px solid #ccc;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

#weekly-summary h2 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-color);
}

#weekly-summary table {
    width: 80%;
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--background-color);
    box-shadow: var(--box-shadow);
}

#weekly-summary th,
#weekly-summary td {
    padding: 14px 20px;
    text-align: center;
    border: 1px solid #ccc;
}

#weekly-summary th {
    background-color: #e0e0e0;
    color: var(--text-color);
    font-weight: bold;
}

#weekly-summary td {
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Icon Styling */
.custom-file-upload i,
.color-picker-btn i {
    color: var(--pencil-icon-color);
}

/* Media Queries */
@media (max-width: 800px) {
    #kanban {
        flex-direction: column;
    }
    .column {
        width: 100%;
        margin: 10px 0;
    }
    .name {
        font-size: 1.2em !important;
    }
    .points-display {
        font-size: 1em !important;
    }
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    /* Theme toggle */
    .theme-toggle {
        background-color: var(--section-background);
    }
    .theme-toggle i {
        color: var(--header-text);
    }
    /* Chores */
    .completed-chores {
        background-color: #2a2a2a;
    }
    .incomplete-chore-item {
        background-color: #3a3a2a;
        border-color: #5a5a40;
    }
    .incomplete-chore-item:hover {
        background-color: #4a4a3a;
    }
    .completed-chore-item {
        background-color: #2a3a2a;
        border-color: #3a5a3a;
    }
    .completed-chore-item:hover {
        background-color: #3a4a3a;
    }
    .completion-count,
    .chore-points {
        color: rgba(255, 255, 255, 0.6);
    }
    .chore-title {
        color: var(--text-color);
    }
    /* Completed rewards */
    .completed-rewards {
        background-color: #2a2a2a;
    }
    .completed-reward-item {
        background-color: #333333;
    }
    .completed-reward-item:hover {
        background-color: #444444;
    }
    .completed-reward-content {
        color: var(--text-color);
    }
    /* Person columns */
    .column {
        color: var(--text-color);
        background-color: #444;
        border: 1px solid #555;
    }
    /* Weekly summary */
    #weekly-summary {
        background-color: #232323 !important;
        color: #ffd000 !important;
        border-top: 2px solid #555 !important;
    }
    #weekly-summary h2 {
        color: #ffd000 !important;
    }
    #weekly-summary table {
        background-color: #232323 !important;
        box-shadow: var(--box-shadow);
    }
    #weekly-summary th,
    #weekly-summary td {
        border: 1px solid #555 !important;
    }
    #weekly-summary th {
        background-color: #3a3a3a !important;
        color: #ffd000 !important;
    }
    #weekly-summary td {
        background-color: #232323 !important;
        color: #ffd000 !important;
    }
    /* Complete button */
   .complete-reward-btn {
        background: #4CAF50;
        border: none;
        color: white;
        cursor: pointer;
        padding: 8px 16px;
        border-radius: var(--border-radius);
        transition: background-color 0.3s ease, transform 0.3s ease;
        font-size: 0.9em;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .complete-reward-btn:hover {
        background-color: #45a049;
        transform: scale(1.05);
    }
}

.chore-points-circle {
    position: relative;
    background: linear-gradient(135deg, #6366f1 60%, #10b981 100%);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1em;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.13);
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    margin-right: 8px;
    margin-left: 0;
    transition: transform 0.2s;
    z-index: 10;
}
.chore-points-circle::after {
    content: "pts";
    font-size: 0.6em;
    line-height: 1;
    margin-top: 1px;
    text-transform: uppercase;
    font-weight: 600;
}
    color: var(--rewards-icon-color);
    margin-bottom: 10px; /* Space below icon */
}

.reward-content {
    margin-bottom: 10px; /* Space below content */

}

.reward-title {
    font-size: 1em; /* Slightly smaller title */
    font-weight: 600; /* Bolder title */
    margin-bottom: 5px;
    line-height: 1.3; /* Improved line height */
}

.reward-points {
    font-size: 1em;
    justify-content: center;
    color: #666;
}

.reward-assigned {
    margin-bottom: 10px; /* Space below avatar */
}

.redeemer-avatar {
    width: 80px;
    height: 80px;
}

.reward-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Style for icons with shadow */
.action-icons i,
.custom-file-upload,
.colorpicker {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    border-radius: 5px; /* Match other elements */
    padding: 3px; /* Add some padding around the icon */
    background-color: rgba(255, 255, 255, 0.1); /* Optional: Add a very subtle background */
}
#pin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    pointer-events: all;
    color: var(--text-color);
}

#pin-form-container {
    background: var(--section-background);
    color: var(--text-color);
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}

#pin-input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: var(--background-color);
    color: var(--text-color);
}
/* Activity Log Specific Styles */

/* Activity Log Container */
.activity-log-container {
    padding: 25px;
    margin: 20px;
    background-color: var(--section-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Activity Log Header */
.activity-log-header {
    text-align: center;
    margin-bottom: 30px;
}

.activity-log-header h2 {
    font-size: 2.2em;
    color: var(--text-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.activity-log-subtitle {
    color: rgba(var(--text-color), 0.7);
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Filter Controls */
.activity-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--button-background);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.clear-filters-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clear-filters-btn:hover {
    background-color: #d32f2f;
    transform: scale(1.05);
}

/* Activity Log List */
.activity-log-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Activity Log Item */
.activity-log-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid var(--button-background);
}

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

/* Activity Icon */
.activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 20px;
    font-size: 1.5em;
    color: var(--icon-color, white);
    flex-shrink: 0;
    transition: background-color 0.3s;
}
:root {
    --icon-color: #000000;
}
[data-theme="dark"] {
    --icon-color: #ffffff;
}
[data-theme="dark"] .activity-icon.points-reset,
[data-theme="dark"] .activity-icon.avatar-updated,
[data-theme="dark"] .activity-icon.name-updated {
    background-color: #1565c0 !important; /* Darker blue for dark mode */
}

[data-theme="dark"] .activity-icon.quiz-completed {
    background-color: #E65100 !important; /* Darker orange for dark mode */
}

[data-theme="dark"] .activity-icon.setup-completed {
    background-color: #4527A0 !important; /* Darker purple for dark mode */
}

/* Activity Type Colors */
.activity-icon.chore-added,
.activity-icon.chore-completed,
.activity-icon.daily-chore-added {
    background-color: #4CAF50;
}

.activity-icon.chore-deleted,
.activity-icon.daily-chore-deleted {
    background-color: #f44336;
}

.activity-icon.reward-added,
.activity-icon.reward-redeemed {
    background-color: #FF9800;
}

.activity-icon.reward-deleted {
    background-color: #f44336;
}

.activity-icon.points-reset,
.activity-icon.name-updated,
.activity-icon.avatar-updated {
    background-color: #2196F3;
}

.activity-icon.family-member-added {
    background-color: #9C27B0;
}

.activity-icon.daily-chores-reset {
    background-color: #607D8B;
}

.activity-icon.system-error {
    background-color: #f44336;
}

.activity-icon.settings-updated,
.activity-icon.color-updated,
.activity-icon.order-updated {
    background-color: #795548;
}

.activity-icon.quiz-completed {
    background-color: #FF9800;
}

.activity-icon.setup-completed {
    background-color: #673AB7;
}

/* Activity Content */
.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.activity-description {
    font-size: 1.1em;
    color: var(--text-color);
    font-weight: 500;
    line-height: 1.4;
}

.activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 0.9em;
    color: rgba(var(--text-color), 0.7);
}

.activity-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.activity-type {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: var(--section-background);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-user {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

/* Empty State */
.activity-log-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(var(--text-color), 0.6);
}

.activity-log-empty i {
    font-size: 4em;
    margin-bottom: 20px;
    color: rgba(var(--text-color), 0.3);
}

.activity-log-empty h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--text-color);
}

.activity-log-empty p {
    font-size: 1.1em;
    line-height: 1.6;
}

/* Error State */
.activity-log-error {
    text-align: center;
    padding: 40px 20px;
    background-color: #ffebee;
    border-radius: var(--border-radius);
    border-left: 4px solid #f44336;
}

.activity-log-error i {
    font-size: 3em;
    color: #f44336;
    margin-bottom: 15px;
}

.activity-log-error h3 {
    color: #f44336;
    margin-bottom: 10px;
}

/* Stats Summary */
.activity-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
    padding: 15px;
    background-color: var(--section-background);
    border-radius: var(--border-radius);
    min-width: 120px;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: var(--button-background);
    display: block;
}

.stat-label {
    font-size: 0.9em;
    color: rgba(var(--text-color), 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .activity-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
        min-width: unset;
    }
    
    .activity-log-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .activity-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .activity-meta {
        justify-content: center;
    }
    
    .activity-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-item {
        min-width: unset;
    }
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    .activity-filters {
        background-color: #2a2a2a;
    }
    
    .filter-select {
        background-color: #333333;
        border-color: #555555;
        color: var(--text-color);
    }
    
    .filter-select:focus {
        border-color: var(--button-background);
    }
    
    .activity-log-item {
        background-color: #333333;
    }
    
    .activity-log-item:hover {
        background-color: #404040;
    }
    
    .activity-type {
        background-color: #404040;
    }
    
    .activity-stats {
        background-color: #2a2a2a;
    }
    
    .stat-item {
        background-color: #333333;
    }
    
    .activity-log-error {
        background-color: #3a2a2a;
    }
}

/* Animation for new items */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-log-item.new-item {
    animation: slideInFromTop 0.5s ease-out;
}

/* Loading State */
.activity-log-loading {
    text-align: center;
    padding: 40px;
    color: rgba(var(--text-color), 0.6);
}

.activity-log-loading i {
    font-size: 2em;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* === Tablet-friendly Form Controls for Chores & Rewards === */

/* General form controls: larger padding, font, and height */
input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
    font-size: 1.2em;
    padding: 14px 16px;
    border-radius: var(--border-radius);
    border: 1px solid #ccc;
    margin-bottom: 12px;
    box-sizing: border-box;
    min-height: 48px;
    background: var(--background-color);
    color: var(--text-color);
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--button-background);
    outline: none;
}

/* Make buttons larger and more touch-friendly */
button,
input[type="submit"],
input[type="button"] {
    font-size: 1.2em;
    padding: 14px 28px;
    min-height: 48px;
    border-radius: var(--border-radius);
    margin: 8px 0;
}

/* Chore/reward suggestion buttons */
.chore-suggestion-button,
.reward-suggestion-button {
    font-size: 1.1em;
    padding: 12px 22px;
    min-height: 44px;
    border-radius: var(--border-radius);
    margin: 6px 4px;
}

/* Checkbox label spacing */
.form-group {
    font-size: 1.1em;
    padding: 10px 0;
}

/* Responsive: Even bigger on tablets */
@media (min-width: 600px) and (max-width: 1024px) {
    input[type="text"],
    input[type="number"],
    input[type="password"],
    select,
    textarea {
        font-size: 1.35em;
        padding: 18px 20px;
        min-height: 56px;
    }
    button,
    input[type="submit"],
    input[type="button"] {
        font-size: 1.35em;
        padding: 18px 36px;
        min-height: 56px;
    }
    .chore-suggestion-button,
    .reward-suggestion-button {
        font-size: 1.2em;
        padding: 16px 28px;
        min-height: 52px;
    }
}

/* Ensure select dropdown arrows are visible and large enough */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,<svg width='16' height='16' viewBox='0 0 16 16' fill='gray' xmlns='http://www.w3.org/2000/svg'><path d='M4 6l4 4 4-4' stroke='gray' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1.2em center;
    background-size: 1.5em;
    padding-right: 2.5em;
}

/* Make sure forms are not too wide on tablets */
form {
    max-width: 100%;
}

/* Optional: Increase label size for better readability */
label,
.label-text {
    font-size: 1.1em;
    margin-bottom: 6px;
}

/* Ensure reset and palette icons are visible in dark mode, even on white backgrounds */
[data-theme="dark"] .action-icons .reset-points-icon,
[data-theme="dark"] .action-icons .fa-palette {
    color: #222222 !important;
}
#kanban {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: stretch; /* Stretch columns to fill the container */
}

.column {
  flex-grow: 1;
  flex-basis: 0;
  min-width: 250px; /* Minimum width for each kanban column */
  display: flex;
  flex-direction: column;
  height: 100%;
}