/* =============================================
   IMPROVEMENT STYLES: greeting, progress, balance, all-done, tap targets
   ============================================= */

/* Morning greeting — single bar above the kanban columns */
.morning-greeting-bar {
    text-align: center;
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    padding: 4px 8px 10px;
    letter-spacing: 0.3px;
    opacity: 0.9;
}

/* Prominent balance display */
.balance-label {
    text-align: center;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #e2e8f0;
    margin-bottom: 2px;
    background: #1e1e1e;
    padding: 3px 12px 2px;
    border-radius: 999px;
}

.points-display {
    font-size: 1.1em;
    color: inherit;
    margin: 4px 0 6px;
    font-weight: 500;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.points-display .chore-points-badge {
    font-size: 2em;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1e1e1e;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 6px 16px;
    color: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.points-display .chore-points-badge i {
    font-size: 1em;
}

/* Progress bar */
.chore-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 8px;
}

.chore-progress-bar-container {
    flex: 1;
    height: 10px;
    background: rgba(0,0,0,0.20);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.15);
}

.chore-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.chore-progress-label {
    font-size: 0.78em;
    font-weight: 700;
    color: #f1f5f9;
    background: #1e1e1e;
    white-space: nowrap;
    min-width: 50px;
    text-align: center;
    border-radius: 999px;
    padding: 2px 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* All-Done banner */
.all-done-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 24px;
    margin: 8px;
    border-radius: 18px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #34d399;
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.25);
    animation: allDonePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes allDonePop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.all-done-emoji {
    font-size: 3.5em;
    line-height: 1;
    animation: allDoneBounce 0.8s ease infinite alternate;
}

@keyframes allDoneBounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-8px); }
}

.no-chores-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 24px;
    margin: 8px;
    border-radius: 18px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border: 2px solid #38bdf8;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.22);
    animation: allDonePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.no-chores-emoji {
    font-size: 3.5em;
    line-height: 1;
    animation: noChoresBob 2.5s ease-in-out infinite alternate;
}

@keyframes noChoresBob {
    from { transform: rotate(-8deg); }
    to   { transform: rotate(8deg); }
}

.no-chores-text {
    font-size: 2em;
    font-weight: 900;
    color: #fff;
    background: #0369a1;
    margin-top: 10px;
    letter-spacing: 1px;
    border-radius: 10px;
    padding: 4px 18px;
}

.no-chores-subtext {
    font-size: 1em;
    font-weight: 700;
    color: #fff;
    background: #0284c7;
    margin-top: 6px;
    border-radius: 999px;
    padding: 3px 14px;
}

.all-done-text {
    font-size: 2em;
    font-weight: 900;
    color: #fff;
    background: #1e1e1e;
    margin-top: 10px;
    letter-spacing: 1px;
    border-radius: 10px;
    padding: 4px 18px;
}

.all-done-subtext {
    font-size: 1em;
    font-weight: 700;
    color: #fff;
    background: #1e1e1e;
    margin-top: 6px;
    border-radius: 999px;
    padding: 3px 14px;
}

/* Bigger touch targets for Complete button on tablet */
.btn-complete-chore {
    width: 100%;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    padding: 16px 20px !important;
    border-radius: 12px !important;
    font-size: 1.15em !important;
    font-weight: 700 !important;
    min-height: 56px !important;
    justify-content: center !important;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.28) !important;
    transition: all 0.2s !important;
    touch-action: manipulation;
}

/* Edit name pencil icon — same shape as the file-upload button */
.edit-name-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px !important;
    padding: 5px !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2) !important;
    font-size: 16px !important;
    color: var(--pencil-icon-color) !important;
    transition: opacity 0.3s, transform 0.3s;
    vertical-align: middle;
    cursor: pointer;
    width: 30px;
    height: 30px;
    box-sizing: border-box;
}

[data-theme="dark"] .edit-name-icon {
    background-color: var(--icon-bg-dark) !important;
}

.edit-name-icon:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* Kanban colour-picker label — same shape as the file-upload button */
.color-picker-label {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px !important;
    padding: 5px !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2) !important;
    transition: opacity 0.3s, transform 0.3s;
    cursor: pointer;
    width: 30px;
    height: 30px;
    box-sizing: border-box;
}

[data-theme="dark"] .color-picker-label {
    background-color: var(--icon-bg-dark) !important;
}

.color-picker-label:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* =============================================
   STREAK & BADGES
   ============================================= */
/* Tappable avatar hint */
.avatar-tappable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.avatar-tappable:hover {
    transform: scale(1.07);
    box-shadow: 0 0 0 3px #fbbf24, 0 4px 16px rgba(0,0,0,0.3);
}

/* =============================================
   PROFILE PAGE
   ============================================= */
.profile-page {
    background: #1a1a2e;
    min-height: 100vh;
    color: #f1f5f9;
    font-family: inherit;
}
.profile-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}
.profile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 20px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    transition: background 0.2s, color 0.2s;
}
.profile-back-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

.profile-hero {
    border: 2px solid #444;
    border-radius: 20px;
    padding: 28px 20px 20px;
    text-align: center;
    margin-bottom: 28px;
    background: rgba(255,255,255,0.04);
}
.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fbbf24;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.profile-name {
    font-size: 2em;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
}
.profile-stats-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.profile-stat {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 18px;
    min-width: 80px;
    text-align: center;
}
.profile-stat-value {
    font-size: 1.35em;
    font-weight: 800;
    color: #fbbf24;
}
.profile-stat-label {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-top: 2px;
}
.profile-best-streak {
    font-size: 0.85em;
    color: #94a3b8;
    margin-top: 6px;
}

.profile-section-title {
    font-size: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #94a3b8;
    margin: 0 0 14px;
}
.profile-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.profile-badge-card {
    border-radius: 16px;
    padding: 18px 12px 14px;
    text-align: center;
    border: 2px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}
.profile-badge-card.badge-earned {
    background: linear-gradient(135deg, #1e2a1e 0%, #0f2e1a 100%);
    border-color: #10b981;
    box-shadow: 0 2px 12px rgba(16,185,129,0.18);
}
.profile-badge-card.badge-earned:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16,185,129,0.3);
}
.profile-badge-card.badge-locked {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    filter: grayscale(1);
    opacity: 0.55;
}
.profile-badge-emoji {
    font-size: 2.8em;
    margin-bottom: 6px;
    line-height: 1;
}
.profile-badge-name {
    font-size: 0.9em;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 4px;
}
.profile-badge-desc {
    font-size: 0.75em;
    color: #94a3b8;
    line-height: 1.35;
}
.badge-locked-label {
    margin-top: 6px;
    font-size: 0.7em;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.streak-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    background: #1e1e1e;
    border-radius: 999px;
    padding: 4px 14px;
    margin: 4px auto 2px;
    width: fit-content;
    font-size: 0.9em;
    font-weight: 700;
    color: #fff;
}
.streak-display.hidden { display: none; }
.streak-flame { font-size: 1.1em; }
.streak-count { color: #fbbf24; letter-spacing: 0.3px; }
.streak-best { color: #94a3b8; font-size: 0.8em; font-weight: 600; }

.badge-shelf {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 4px auto 2px;
    min-height: 0;
    background: #1e1e1e;
    border-radius: 12px;
    padding: 5px 10px;
    width: fit-content;
    max-width: 100%;
}
.badge-shelf:empty { margin: 0; padding: 0; background: none; }
.badge-item {
    font-size: 1.55em;
    cursor: default;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
    transition: transform 0.15s;
}
.badge-item:hover { transform: scale(1.25); }

/* Badge earned popup */
.badge-earned-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.badge-earned-popup.badge-earned-visible { opacity: 1; }
.badge-earned-inner {
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    border: 3px solid #fbbf24;
    border-radius: 20px;
    padding: 32px 40px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    animation: badgePop 0.4s cubic-bezier(.175,.885,.32,1.275);
}
.badge-earned-emoji { font-size: 4em; margin-bottom: 8px; }
.badge-earned-title { font-size: 1em; font-weight: 700; color: #fbbf24; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 4px; }
.badge-earned-name { font-size: 1.6em; font-weight: 800; color: #fff; margin-bottom: 6px; }
.badge-earned-desc { font-size: 0.95em; color: #94a3b8; }
@keyframes badgePop {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes profileModalIn {
    0% { transform: scale(0.88) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* =============================================
   COLLAPSIBLE SECTIONS
   ============================================= */
.collapsible-section > .section-toggle {
    cursor: pointer;
    user-select: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.collapsible-section > .section-toggle:hover {
    opacity: 0.85;
}

.section-chevron {
    font-size: 0.75em;
    display: inline-block;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.collapsible-section.collapsed > .section-toggle .section-chevron {
    transform: rotate(-90deg);
}

.collapsible-section.collapsed > *:not(.section-toggle) {
    display: none !important;
}

/* 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 #6366f1;
    border-radius: 50%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.bonus-mode-label input[type="radio"]:checked ~ .custom-radio {
    border-color: #6366f1;
    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: #6366f1;
    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 */
    button {
        font-size: 1em;
        padding: 10px 18px;
    }
}

@media (min-width: 1025px) {
    /* Desktop mode */
    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: 1.5rem;
    margin: 1rem;
    background: linear-gradient(135deg, #1a2436 0%, #1e2d42 100%);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.section-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.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: 1.5rem;
    background: linear-gradient(135deg, #1a3a2a 0%, #1e4d32 100%);
    color: white;
}

.reward-icon-large {
    font-size: 3em;
    margin-bottom: 1rem;
}

.reward-content {
    padding: 1.5rem;
}

.reward-title-modern {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}

.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: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
}

.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.6rem 1.2rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-redeem {
    background: #4CAF50;
    color: white;
}

.btn-redeem:hover {
    background: #45a049;
    box-shadow: 0 3px 12px rgba(76,175,80,0.4);
    transform: translateY(-1px);
}

.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: 1.5rem;
    margin: 1rem;
    background: linear-gradient(135deg, #1a2436 0%, #1e2d42 100%);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

/* Legacy form-grid kept for other uses */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* --- Reward create form layout --- */
.reward-create-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 1.2rem;
}

.reward-form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: start;
}

.reward-form-meta {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 170px;
}

.reward-image-group {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}

.reward-image-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.reward-image-or {
    font-size: 0.78em;
    opacity: 0.45;
    font-weight: 500;
    flex-shrink: 0;
}

.reward-url-input {
    flex: 1;
    min-width: 120px;
}

.btn-upload-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.btn-upload-inline:hover {
    background: rgba(255,255,255,0.2);
}

.stock-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.stock-picker-btn:hover { background: #45a049; }
.stock-picker-btn.stock-picker-chosen { background: #388e3c; }
.stock-picker-btn .fa-chevron-down,
.stock-picker-btn .fa-chevron-up { font-size: 0.75em; opacity: 0.7; }

.reward-submit-btn {
    align-self: flex-start;
    margin-top: 0.4rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.95em;
}

/* ── Shared page nav bar (index, settings, activity_log) ── */
.activity-page-nav {
    margin: 0 0 1.5rem 0;
    display: flex;
    gap: 8px;
    background: linear-gradient(135deg, #1a2436 0%, #1e2d42 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 0.6rem 1rem;
}
.activity-page-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 500;
    padding: 0.45em 0.9em;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.activity-page-nav a:hover {
    background: rgba(76,175,80,0.18);
    color: #4CAF50;
}

.modern-input, .modern-textarea, .modern-select {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modern-input:focus, .modern-textarea:focus, .modern-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18);
}

.modern-textarea {
    resize: vertical;
    min-height: 70px;
}

.btn-primary {
    background: var(--button-background);
    color: white;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--button-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: var(--text-color);
    padding: 0.65rem 1.1rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.16);
}

.reward-suggestions-container {
    margin-bottom: 1rem;
}

.suggestion-controls {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.btn-suggestion-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.btn-suggestion-add:hover { background: rgba(255,255,255,0.18); }

.suggestion-inline-input {
    flex: 1;
    min-width: 140px;
    padding: 0.55rem 0.85rem;
}

.suggestion-controls .modern-input {
    flex: 1;
    min-width: 150px;
    padding: 0.6rem 0.9rem;
}

@media (max-width: 768px) {
    .rewards-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .reward-form-row { grid-template-columns: 1fr; }
    .reward-form-meta { flex-direction: row; }
    .suggestion-controls { flex-wrap: wrap; }
    .reward-image-options { flex-direction: column; align-items: stretch; }
    .reward-image-or { text-align: center; }
}


: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: transparent;
    color: var(--header-text);
    padding: 0;
    margin-bottom: 0;
}

.logo {
    width: 245px;
    height: auto;
    display: block; /* Ensure logo is block-level */
    margin: 0 auto; /* Center the logo */
}

/* Navigation Styles — base (overridden by .activity-page-nav) */
nav {
    background: transparent;
    color: var(--header-text);
    padding: 0;
}

nav a {
    color: var(--header-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ddd;
}

/* Section Styles */
section {
    padding: 1.5rem;
    margin: 1rem;
    background: linear-gradient(135deg, #1a2436 0%, #1e2d42 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

/* Typography */
h2 {
    font-size: 1.6em;
    color: var(--text-color);
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 0.3px;
}

h3 {
    margin-top: 0;
    font-size: 1.5em; /* Adjusted size */
    color: var(--text-color);
    font-weight: 600; /* Slightly bolder */
}
/* Kanban name pill overrides the global h3 color — do not touch this */
.column-header .name {
    color: #f1f5f9 !important;
}

/* Points Display — see prominent override at top of file */

/* Avatar Styles */
.avatar-container {
    text-align: center;
    margin-bottom: var(--spacing-unit);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid rgba(255,255,255,0.55);
    box-shadow: 0 3px 14px rgba(0,0,0,0.22);
    transition: transform 0.25s ease, box-shadow 0.2s;
    background: #d1d5db;
    display: block;
}

.avatar:hover {
    transform: scale(1.07);
    box-shadow: 0 5px 22px rgba(0,0,0,0.30);
}

/* 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,
[data-theme="dark"] .color-picker-label {
    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,
.edit-name-icon,
.color-picker-label 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: 14px 16px;
    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: box-shadow 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.chore:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

/* Chore card header: icon + title + delete */
.chore-header {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.chore-icon {
    font-size: 1.35em;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
    line-height: 1;
}

.chore-title {
    flex: 1;
    font-size: 1.05em;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
    color: var(--text-color);
}

/* Small unobtrusive delete button — absolutely pinned to top-right of card */
.btn-delete-chore-sm {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    background: transparent !important;
    color: rgba(239, 68, 68, 0.45) !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 4px 7px !important;
    font-size: 0.75em !important;
    line-height: 1 !important;
    box-shadow: none !important;
    transition: color 0.15s, background 0.15s !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-delete-chore-sm:hover {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #f87171 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Chore metadata row: tags + points badge */
.chore-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.chore-tags {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    flex: 1;
}

.chore-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72em;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
    border-radius: 999px;
    padding: 3px 8px;
    white-space: nowrap;
}

.chore-tag-daily {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.12);
}

.chore-tag-due {
    color: #fb923c;
    background: rgba(251, 146, 60, 0.12);
}

.btn-complete-chore:hover, .btn-complete-chore:focus {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 16px rgba(16, 185, 129, 0.42) !important;
}

/* 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;
}

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: #6366f1;
    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: #6366f1;
    font-weight: bold;
}

/* Complete button styling */
.complete-reward-btn {
    background: #6366f1;
    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: #4CAF50;
        border-radius: 4px;
        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 — SINGLE SOURCE OF TRUTH
   Edit ONLY here. Do not add duplicate #kanban or .column rules
   anywhere else in this file — they will silently override these.
   ──────────────────────────────────────────────────────────────── */
#kanban {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 20px;
    justify-content: space-between;
}

.column {
    background-color: var(--section-background);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 18px;
    padding: 16px 14px 10px;
    flex-grow: 1;
    flex-basis: 0;
    min-width: 250px;
    text-align: center;
    position: relative;
    color: var(--text-color);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18), 0 1px 4px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
}

.column:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    transform: translateY(-2px);
}

/* Column header — authoritative rules are at end of file */

/* Chores section header — authoritative rules are at end of file */

/* Column footer / drag handle — authoritative rules are at end of file */

/* 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: 500px) {
    #kanban {
        flex-direction: column;
    }
    .column {
        width: 100%;
        margin: 10px 0;
    }
    .name {
        font-size: 1.2em !important;
    }
    .points-display {
        font-size: 0.85em !important;
    }
    .points-display .chore-points-badge {
        font-size: 1.5em;
        padding: 4px 12px;
    }
}

/* 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: #6366f1;
        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(99, 102, 241, 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: #6366f1;
}

.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;
}

/* Stock image picker for reward creation */
.stock-image-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}
.stock-image-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border-radius: 12px;
    border: 3px solid transparent;
    padding: 4px;
    background: rgba(255,255,255,0.07);
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.stock-image-tile:hover {
    border-color: #a78bfa;
    background: rgba(167,139,250,0.12);
}
.stock-image-tile:active {
    transform: scale(0.95);
}
.stock-image-tile.selected {
    border-color: #7c3aed;
    background: rgba(124,58,237,0.18);
    box-shadow: 0 0 0 2px #7c3aed44;
}
.stock-image-tile img {
    width: 72px;
    height: 72px;
    border-radius: 9px;
    object-fit: cover;
    display: block;
}
.stock-image-tile span {
    font-size: 0.72em;
    margin-top: 5px;
    color: #e2e8f0;
    text-align: center;
    max-width: 80px;
    line-height: 1.2;
}
@media (min-width: 600px) and (max-width: 1024px) {
    .stock-image-tile img {
        width: 88px;
        height: 88px;
    }
    .stock-image-tile span {
        font-size: 0.85em;
        max-width: 96px;
    }
}
/* ===================================================
   Add Chore Form — Professional Revamp
   =================================================== */

/* Suggestions bar */
.chore-suggestions-bar {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.2rem;
}

.chore-suggestions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.55rem;
    flex-wrap: wrap;
}

.chore-suggestions-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    flex: 1;
}

.chore-suggestions-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Suggestion chips (normal mode) */
.chore-suggestion-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 13px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: var(--text-color);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    margin: 3px 2px;
}

.chore-suggestion-chip:hover {
    background: rgba(76,175,80,0.18);
    border-color: rgba(76,175,80,0.55);
}

/* Edit mode items */
.chore-suggestion-edit-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 3px 2px;
}

.btn-suggestion-delete {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: rgba(239,68,68,0.35);
    color: #fca5a5;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.btn-suggestion-delete:hover {
    background: rgba(239,68,68,0.6);
}

/* Form card */
.chore-form-card {
    background: linear-gradient(135deg, #1a2436 0%, #1e2d42 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

/* Field group (label + control) */
.chore-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.chore-field-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Larger title input */
.chore-title-input {
    font-size: 1.05rem !important;
    padding: 0.82rem 1rem !important;
}

/* Person pill buttons */
.chore-assign-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chore-assign-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    min-height: 46px;
    white-space: nowrap;
}

.chore-assign-pill:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.25);
}

.chore-assign-pill.selected {
    background: rgba(76,175,80,0.25);
    border-color: #4CAF50;
    color: #fff;
}

.pill-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(76,175,80,0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.chore-assign-pill.selected .pill-avatar {
    background: #4CAF50;
}

/* Points + Repeating two-column row */
.chore-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 500px) {
    .chore-meta-row { grid-template-columns: 1fr; }
}

/* Points stepper — modern pill design */
.chore-points-stepper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

.stepper-btn {
    background: rgba(255,255,255,0.10);
    border: 1.5px solid rgba(255,255,255,0.18);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 300;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.stepper-btn:hover {
    background: rgba(255,255,255,0.20);
    transform: scale(1.08);
}

.stepper-btn:active {
    transform: scale(0.93);
}

.points-number-input {
    width: 80px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.10) !important;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    outline: none;
    padding: 0;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    margin-bottom: 0 !important;
    min-height: unset !important;
}

.points-number-input:focus {
    background: rgba(255,255,255,0.16) !important;
    border: none !important;
}

.points-number-input::-webkit-inner-spin-button,
.points-number-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.chore-quick-points {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    align-items: center;
}

/* Label above quick chips */
.chore-quick-points::before {
    content: 'Quick:';
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
    white-space: nowrap;
    align-self: center;
}

.quick-pt-btn {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.07);
    color: var(--text-color);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    min-height: unset !important;
    padding-top: 5px;
    padding-bottom: 5px;
    line-height: 1.2;
}

.quick-pt-btn:hover {
    background: rgba(76,175,80,0.28);
    border-color: rgba(76,175,80,0.7);
    transform: translateY(-1px);
}

.quick-pt-btn:active {
    transform: scale(0.94);
}

/* Toggle switch */
.chore-toggle-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.chore-toggle-input {
    display: none;
}

.chore-toggle-track {
    width: 48px;
    height: 26px;
    border-radius: 13px;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.15);
    position: relative;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.chore-toggle-input:checked + .chore-toggle-track {
    background: #4CAF50;
    border-color: #4CAF50;
}

.chore-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s cubic-bezier(.34,1.4,.64,1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.chore-toggle-input:checked + .chore-toggle-track .chore-toggle-thumb {
    transform: translateX(22px);
}

.chore-toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 24px;
}

/* Days of week row */
.chore-days-row {
    background: rgba(76,175,80,0.05);
    border: 1px solid rgba(76,175,80,0.2);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    animation: choreSlideDown 0.18s ease;
}

@keyframes choreSlideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chore-day-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chore-day-pill {
    cursor: pointer;
    line-height: 1;
}

.chore-day-pill input[type="checkbox"] {
    display: none;
}

.chore-day-pill span {
    display: flex;
    align-items: center;
    padding: 6px 13px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
    font-size: 0.84rem;
    font-weight: 600;
    transition: background 0.14s, border-color 0.14s;
    min-height: 34px;
    min-width: 40px;
    justify-content: center;
}

.chore-day-pill input:checked + span {
    background: rgba(76,175,80,0.25);
    border-color: #4CAF50;
    color: #fff;
}

.chore-days-hint {
    font-size: 0.76rem;
    color: rgba(255,255,255,0.32);
    font-style: italic;
    margin-left: 4px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* Due date row */
.chore-due-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chore-due-toggle-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

#due-datetime-wrap {
    animation: choreSlideDown 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chore-due-warning {
    font-size: 0.77rem;
    color: rgba(248,113,113,0.65);
    margin: 0;
    font-style: italic;
}

/* Submit button */
.btn-add-chore {
    background: #4CAF50;
    color: #fff;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, transform 0.1s, box-shadow 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    box-shadow: 0 2px 10px rgba(76,175,80,0.3);
}

.btn-add-chore:hover {
    background: #45a049;
    box-shadow: 0 4px 16px rgba(76,175,80,0.45);
}

.btn-add-chore:active {
    transform: scale(0.98);
}

/* Tablet overrides for the new chore form */
@media (min-width: 600px) and (max-width: 1024px) {
    .chore-assign-pill { min-height: 52px; font-size: 1.05rem; }
    .chore-title-input { font-size: 1.2rem !important; padding: 1rem 1.1rem !important; }
    .stepper-btn { width: 44px; height: 46px; font-size: 1.3rem; }
    .points-number-input { width: 62px; height: 46px; font-size: 1.05rem; }
    .chore-day-pill span { min-height: 38px; font-size: 0.95rem; padding: 7px 15px; }
    .btn-add-chore { min-height: 58px; font-size: 1.15rem; }
    .quick-pt-btn { font-size: 0.9rem; padding: 6px 13px; min-height: 34px; }
}

/* Weekly meal planner */
.meal-planner-section {
    background: linear-gradient(135deg, #141f33 0%, #1a2840 100%);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.24);
    padding: 14px 14px 16px;
    margin: 0 0 16px;
}

.meal-planner-title {
    margin-bottom: 8px;
    color: #f8fafc;
}

.meal-planner-subtitle {
    color: rgba(255,255,255,0.62);
    font-size: 0.9rem;
    margin: 0 0 10px;
    padding: 0 4px;
}

.meal-week-display {
    display: grid;
    grid-template-columns: repeat(7, minmax(170px, 1fr));
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.meal-day-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    padding: 10px;
    min-height: 160px;
}

.meal-day-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 6px;
}

.meal-day-header strong {
    color: #f8fafc;
    font-size: 0.9rem;
}

.meal-day-header span {
    color: rgba(255,255,255,0.6);
    font-size: 0.78rem;
}

.meal-day-items {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.meal-day-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9px;
    padding: 6px;
}

.meal-day-item-image {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.15);
}

.meal-day-item-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.meal-day-item-label {
    color: rgba(255,255,255,0.68);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.meal-display-value {
    color: #f8fafc;
    font-size: 0.84rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.meal-day-empty {
    color: rgba(255,255,255,0.52);
    font-size: 0.83rem;
    font-style: italic;
    padding: 8px 4px;
}

.meal-planner-editor {
    margin-top: 10px;
    background: linear-gradient(135deg, #101a2d 0%, #15243a 100%);
}

.meal-planner-grid-wrap {
    overflow-x: auto;
    margin-top: 4px;
    border-radius: 12px;
}

.meal-planner-grid {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.meal-planner-grid th,
.meal-planner-grid td {
    border: 1px solid rgba(255,255,255,0.08);
    padding: 8px;
    vertical-align: top;
}

.meal-planner-grid th {
    color: #e2e8f0;
    background: rgba(0,0,0,0.26);
    font-weight: 700;
    font-size: 0.88rem;
}

.meal-planner-grid th span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
}

.meal-label-cell {
    min-width: 140px;
    font-weight: 700;
    color: #f8fafc;
    background: rgba(0,0,0,0.18);
}

.meal-label-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 6px 8px;
}

.meal-label-card span {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
}

.meal-label-image {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.meal-slot {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 112px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 6px;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.meal-slot:hover {
    border-color: rgba(96,165,250,0.45);
    background: rgba(96,165,250,0.08);
}

.meal-slot-drop-target {
    outline: 2px dashed #60a5fa;
    background: rgba(96,165,250,0.12);
}

.meal-slot-picked {
    outline: 2px solid #22c55e;
    background: rgba(34,197,94,0.16);
    border-color: rgba(34,197,94,0.55);
}

.meal-drag-handle {
    border: none;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
    border-radius: 6px;
    padding: 4px;
    cursor: grab;
    width: 28px;
}

.meal-drag-handle:active {
    cursor: grabbing;
}

.meal-input {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(0,0,0,0.25);
    color: #fff;
    border-radius: 8px;
    padding: 8px;
    font-size: 0.86rem;
}

.meal-quick-add {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(0,0,0,0.25);
    color: #fff;
    border-radius: 8px;
    padding: 7px;
    font-size: 0.82rem;
}

.meal-planner-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.meal-suggestions-panel {
    margin-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 12px;
}

.meal-suggestions-title {
    display: block;
    color: rgba(255,255,255,0.8);
    font-weight: 700;
    margin-bottom: 8px;
}

.meal-suggestion-add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

#meal-suggestion-input {
    min-width: 220px;
    flex: 1;
}

.meal-suggestions-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meal-suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: #f8fafc;
    padding: 4px 10px;
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .meal-week-display {
        grid-template-columns: repeat(7, minmax(150px, 1fr));
    }

    .meal-planner-actions {
        justify-content: stretch;
    }

    .meal-planner-actions .save-btn {
        width: 100%;
    }
}

.meal-suggestion-chip button {
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    cursor: pointer;
    line-height: 1;
}

.meal-suggestion-empty {
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
}

/* ════════════════════════════════════════════════════════════════
   KANBAN OVERRIDES — MUST STAY AT END OF FILE
   These rules win by cascade order. Do NOT duplicate #kanban or
   .column-header blocks elsewhere in this stylesheet.
   ════════════════════════════════════════════════════════════════ */
/* Force horizontal layout — overrides any media query that stacks columns */
#kanban {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 12px;
    overflow-x: auto;
}
.column {
    flex: 0 0 clamp(260px, 30vw, 360px) !important;
    min-width: 260px !important;
    max-width: 360px;
    width: auto !important;
    margin: 0 !important;
}
.column:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
    transform: translateY(-2px);
}
.column-header {
    display: block;
    text-align: center;
    width: 100%;
    padding: 6px 4px 8px;
}
.column-header .name {
    color: #f1f5f9 !important;
    background: #1e1e1e;
    border: 2px solid rgba(0,0,0,0.5);
    border-radius: 999px;
    padding: 6px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5em;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}
.column-header .name .edit-name-icon {
    font-size: 0.55em;
    color: #aaaaaa;
    cursor: pointer;
}
.points-display .chore-points-badge {
    max-width: 100%;
    font-size: clamp(1.25rem, 2.2vw, 2rem);
    padding: 6px 12px;
}

.chore-points-value {
    min-width: 0;
    overflow-wrap: anywhere;
}
.chores-to-do-header {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.38);
    margin: 10px 0 4px;
}

/* Drag handle pill */
.column-footer {
    margin-top: auto;
    padding: 10px 8px 6px;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.10);
}
.drag-handle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: grab;
    background: rgba(0,0,0,0.12);
    border: 1.5px dashed rgba(0,0,0,0.25);
    border-radius: 999px;
    padding: 6px 14px;
    color: rgba(0,0,0,0.45);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    user-select: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.drag-handle:hover,
.drag-handle:active {
    background: rgba(0,0,0,0.22);
    color: rgba(0,0,0,0.75);
    border-color: rgba(0,0,0,0.45);
    cursor: grabbing;
}
.drag-handle .drag-handle-label {
    font-size: 0.85em;
    white-space: nowrap;
}

@media (min-width: 600px) and (max-width: 1024px) {
    #kanban {
        gap: 10px;
    }

    .column {
        flex-basis: 300px !important;
        min-width: 300px !important;
        max-width: 340px;
    }
}

/* Google Calendar weekly view */
.google-week-calendar {
    width: 100%;
}

.gcal-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    gap: 10px;
    width: 100%;
}

.gcal-day-column {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gcal-day-header {
    padding: 10px 10px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(15, 23, 42, 0.35);
}

.gcal-day-name {
    font-size: 0.92em;
    font-weight: 700;
    color: #bfdbfe;
}

.gcal-day-date {
    font-size: 0.8em;
    color: rgba(255,255,255,0.55);
}

.gcal-day-events {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gcal-no-events {
    font-size: 0.82em;
    color: rgba(255,255,255,0.35);
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
}

.gcal-event-card {
    border-left: 5px solid var(--gcal-event-color, #4285f4);
    background: var(--gcal-event-color-tint, rgba(66,133,244,0.20));
    border-radius: 9px;
    padding: 8px 8px 7px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gcal-event-time {
    font-size: 0.76em;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.02em;
}

.gcal-event-duration {
    font-weight: 600;
    color: rgba(255,255,255,0.78);
    margin-left: 3px;
}

.gcal-event-title {
    font-size: 0.87em;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.25;
    word-break: break-word;
}

.gcal-event-location {
    font-size: 0.78em;
    color: #94a3b8;
    word-break: break-word;
}

.gcal-event-open {
    margin-top: 2px;
    font-size: 0.76em;
    font-weight: 600;
    color: #60a5fa;
    text-decoration: none;
    align-self: flex-start;
}

.gcal-event-open:hover {
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .gcal-week-grid {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
    }

    .gcal-day-column {
        min-width: 180px;
        flex: 0 0 180px;
        scroll-snap-align: start;
    }
}
