/* ========================================
   COMPASS FAMILY TRACKER - CONSOLIDATED STYLES - NEW THEMES TEST 1  11/19/2026 16:13
   Guiding families toward their true North
   ======================================== */

/* ========================================
   FONTS & IMPORTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700;800&display=swap');

/* ========================================
   CSS VARIABLES - Theme Configuration
   ======================================== */
:root {
    /* Primary theme colors - these get updated when user changes theme */
    --theme-gradient-1: #a78bfa;
    --theme-gradient-2: #6366f1;
    --theme-accent: #6366f1;
    --theme-accent-hover: #4f46e5;
    --theme-accent-light: #f0f9ff;
    --theme-stat-card: #4c1d95;
    --theme-profile-button: #7c3aed;
    
    /* Secondary gradient colors */
    --theme-gradient-secondary-1: #667eea;
    --theme-gradient-secondary-2: #764ba2;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
body .sqs-block-code {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body .sqs-block {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-gradient-1) 50%, var(--theme-gradient-2) 100%);
    padding: 0;
    margin: 0;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* ========================================
   MAIN CONTAINER LAYOUT
   ======================================== */
.app-container {
    background: #fafafa;
    display: flex;
    height: 100vh;
    max-width: none;
    margin: 0;
    overflow: hidden;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
}

/* ========================================
   SIDEBAR - Left Navigation (100px width)
   ======================================== */
.sidebar {
    width: 100px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    padding: 20px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    border-right: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    overflow-y: visible;
    position: relative;
    z-index: 9999;
}

.sidebar-title {
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Sidebar Avatar Styling */
.sidebar-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}

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

.sidebar-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.sidebar-avatar.active {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), 0 6px 20px rgba(0,0,0,0.25);
    transform: scale(1.05);
}

.sidebar-avatar .name {
    position: absolute;
    bottom: -18px;
    font-size: 9px;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.3px;
}

#sidebar-avatars-container {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
}

/* Sidebar Divider */
.sidebar-divider {
    height: 1px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    margin: 16px 0 !important;
    width: 100% !important;
    min-height: 1px !important;
    display: block !important;
}

/* Sidebar Section Titles */
.sidebar-section-title {
    padding: 12px 16px 8px 16px;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sidebar Tracker Button */
.sidebar-tracker-btn {
    width: calc(100% - 16px);
    margin: 0 8px 6px 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-align: left;
    position: relative;
    z-index: 1001;
}

.sidebar-tracker-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

/* Sidebar Action Buttons */
.sidebar-action-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    text-align: center;
}

.sidebar-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

.sidebar-action-btn.wellness {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}

.sidebar-action-btn.wellness:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.4);
}

/* Sidebar Bottom Controls */
.sidebar-controls {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.sidebar-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255,255,255,0.25);
}

/* Tracker Dropdown Menu */
#tracker-buttons-container {
    display: none;
    position: fixed;
    left: 108px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: 1px solid #e5e7eb;
    min-width: 280px;
    max-width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

/* ========================================
   UTILITY BAR - Top Header Bar
   ======================================== */
.utility-bar {
    background: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.app-title-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-title {
    font-size: 32px;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compass-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.app-tagline {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    letter-spacing: 0.2px;
    font-style: italic;
}

/* Utility Bar Right Side Controls */
.utility-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.utility-btn {
    padding: 8px 16px;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.utility-btn:hover {
    border-color: #6366f1;
    background: #f0f9ff;
}

.utility-btn.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

#edit-mode-icon {
    font-size: 14px;
}

#edit-mode-text {
    font-size: 13px;
}

/* Date Picker in Utility Bar */
.date-picker-mini {
    padding: 8px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    background: white;
}

.date-picker-mini:hover {
    border-color: #6366f1;
}

.date-picker-mini:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Member Badge in Utility Bar */
.member-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 20px;
    border: 1px solid #bae6fd;
}

.member-avatar-mini,
#header-member-avatar {
    width: 25%;
    height: 25%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    overflow: hidden;
}

.member-avatar-mini img,
#header-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-size: 13px;
    font-weight: 600;
    color: #0c4a6e;
}

/* ========================================
   SCORE BAR - Point Summary Row
   ======================================== */
.score-bar {
    background: #f9fafb;
    padding: 16px 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.score-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.score-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border-color: #d1d5db;
}

.score-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-value {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.score-subtext {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.score-action-btn {
    margin-top: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.score-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ========================================
   DASHBOARD CONTENT - 3-Column Layout
   Schedule | Tasks/Detail | Goals
   ======================================== */
.dashboard-content {
    flex: 1;
    display: grid;
    grid-template-columns: 380px 1fr 380px;
    gap: 16px;
    padding: 16px;
    overflow: hidden;
    background: #f9fafb;
    height: 0;
    min-height: 0;
}

/* All three columns have independent scrolling */
.schedule-section,
.detail-section,
.goals-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Custom Scrollbar Styling */
.schedule-section::-webkit-scrollbar,
.detail-section::-webkit-scrollbar,
.goals-section::-webkit-scrollbar {
    width: 6px;
}

.schedule-section::-webkit-scrollbar-track,
.detail-section::-webkit-scrollbar-track,
.goals-section::-webkit-scrollbar-track {
    background: transparent;
}

.schedule-section::-webkit-scrollbar-thumb,
.detail-section::-webkit-scrollbar-thumb,
.goals-section::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.schedule-section {
    overflow-y: scroll !important; /* Changed from auto to scroll */
}

#schedule-list {
    padding-bottom: 300vh !important;
    min-height: 100%;
}

.schedule-section {
    overflow-y: scroll !important;
}

/* Section Headers */
.section-header {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.section-header-icon {
    font-size: 18px;
}

/* ========================================
   SCHEDULE SECTION - Left Column
   ======================================== */
#schedule-buttons-container,
#schedule-list {
    display: block !important;
    flex: 1;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    scroll-behavior: smooth;
    align-items: center;
}

/* Individual Schedule Items - Clickable Cards */
.schedule-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 340px;
}

.schedule-item:hover {
    border-color: #6366f1;
    transform: translateX(2px);
}

/* Schedule Item Focus States */
.schedule-item.in-focus {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
    border-width: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

.schedule-item.out-of-focus {
    opacity: 0.5;
    transform: scale(0.92);
    background: #fafafa;
}

.schedule-item.completed {
    background: #ecfdf5;
    border-color: #10b981;
}

.schedule-item.completed.in-focus {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #10b981;
}

.schedule-time {
    font-size: 16px;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.schedule-item.completed .schedule-time {
    color: #10b981;
}

.schedule-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.schedule-item.completed .schedule-name {
    color: #059669;
}

/* Status Badge (replaces yes/no buttons) */
.schedule-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

.schedule-status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.schedule-status-badge.incomplete {
    background: #fef3c7;
    color: #78350f;
}

.schedule-status-badge.pending {
    background: #e0e7ff;
    color: #3730a3;
}

/* Schedule Item Header */
.schedule-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Remove yes-no buttons from regular items */
.yes-no-buttons {
    display: none !important;
}

/* Timeline styling - simplified */
.timeline-item {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.timeline-item::before {
    display: none;
}

.timeline-dot {
    display: none;
}

/* Task list in schedule items - compact */
.schedule-item .task-list {
    list-style: none;
    padding: 0;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.schedule-item .task-list li {
    padding: 2px 0;
    padding-left: 16px;
    position: relative;
}

.schedule-item .task-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #9ca3af;
}

.schedule-item.in-focus .task-list {
    display: none; /* Hide tasks in focused item since they show in center */
}

/* Scroll Hint */
.scroll-hint {
    text-align: center;
    color: #9ca3af;
    font-size: 11px;
    margin-top: 8px;
    font-weight: 500;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ========================================
   DETAIL SECTION - Center Column (Tasks)
   ======================================== */
#schedule-detail-container {
    display: block !important;
    flex: 1;
}

.detail-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.detail-time {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.detail-name {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.3px;
}

/* Progress Section in Detail View */
.progress-section {
    background: #f9fafb;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.progress-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

.progress-mini {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill-mini {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.section-subtitle {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Task List in Detail View */
.detail-tasks {
    flex: 1;
    overflow-y: auto;
}

.task-item {
    background: #fafafa;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.task-item:hover {
    background: #f0f9ff;
    border-color: #6366f1;
    transform: translateX(2px);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #6366f1;
}

.task-text {
    flex: 1;
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

.task-item.completed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #9ca3af;
}

/* Task Lists (generic) */
.task-list {
    list-style: none;
}

.task-list li {
    padding: 4px 0;
    padding-left: 12px;
    position: relative;
    color: #4b5563;
    font-size: 14px;
}

.task-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #9ca3af;
}

/* Complete Button */
.complete-btn {
    margin-top: 20px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transition: all 0.2s;
    letter-spacing: -0.2px;
    width: 100%;
}

.complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.complete-btn.completed {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* ========================================
   GOALS SECTION - Right Column
   ======================================== */
.goals-group {
    margin-bottom: 24px;
}

.goals-header {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.goals-progress {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 14px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 12px;
    border: 1px solid #fbbf24;
}

.goals-progress-text {
    font-size: 11px;
    color: #78350f;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goals-progress-number {
    font-size: 24px;
    font-weight: 800;
    color: #78350f;
    letter-spacing: -0.5px;
}

.goals-subtext {
    font-size: 10px;
    color: #92400e;
    margin-top: 4px;
    font-weight: 600;
}

.week-range {
    font-size: 10px;
    color: #9ca3af;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Weekly Goals and Chores */
.weekly-goal-item,
.chore-item {
    background: #fafafa;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.weekly-goal-item:hover,
.chore-item:hover {
    background: #f0f9ff;
    border-color: #6366f1;
    transform: translateX(2px);
}

.weekly-goal-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6366f1;
}

.weekly-goal-text,
.chore-name {
    flex: 1;
    font-size: 13px;
    color: #1f2937;
    font-weight: 500;
}

.weekly-goal-item.completed,
.chore-item.completed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.weekly-goal-item.completed .weekly-goal-text,
.chore-item.completed .chore-name {
    text-decoration: line-through;
    color: #9ca3af;
}

.completion-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.completion-badge.complete {
    background: #10b981;
    color: white;
}

.completion-badge.incomplete {
    background: #fbbf24;
    color: #78350f;
}

/* ========================================
   CHARACTER DEVELOPMENT / GROWTH AREAS
   ======================================== */
.character-category {
    margin-bottom: 16px;
}

.character-category-title {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    padding-left: 4px;
    letter-spacing: -0.2px;
}

.character-trait-item {
    background: #fafafa;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    transition: all 0.2s;
}

.character-trait-item:hover {
    background: #fef3c7;
    border-color: #fbbf24;
}

.character-trait-text {
    color: #374151;
    font-weight: 600;
}

/* Character Rating Buttons */
.rating-buttons {
    display: flex;
    gap: 4px;
}

.rating-btn {
    padding: 4px 8px;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 60px;
}

.rating-btn:hover {
    border-color: #f59e0b;
    background: #fef3c7;
}

.rating-btn.active {
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.rating-btn.active.level-1 {
    background: linear-gradient(135deg, #fb923c, #f97316);
    border-color: #f97316;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.rating-btn.active.level-2 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.rating-btn.active.level-3 {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #16a34a;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

/* Character Sections */
.character-section {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.character-list {
    list-style: none;
    margin-bottom: 12px;
}

.character-list li {
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
    color: #4b5563;
    font-size: 14px;
}

.character-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #6366f1;
}

/* ========================================
   CARDS & CONTAINERS
   ======================================== */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Stat Cards */
.stat-card {
    padding: 24px;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
}

.stat-sublabel {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

/* Streak Card */
.streak-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 3px solid #f59e0b;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.streak-icon {
    font-size: 36px;
}

.streak-text {
    font-weight: bold;
    color: #78350f;
    font-size: 18px;
}

.streak-subtext {
    color: #92400e;
    font-size: 14px;
}

/* ========================================
   PROGRESS BARS
   ======================================== */
.progress-bar-container {
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 16px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.5s ease;
}

.progress-fill.weekly {
    background: linear-gradient(90deg, #f97316 0%, #ea580c 100%);
}

/* ========================================
   BUTTONS - General Styles
   ======================================== */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: scale(1.02);
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-active {
    background: #6366f1;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Child Selector Buttons */
.child-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.child-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Profile & Theme Buttons */
.profile-edit-btn,
button[onclick*="openMedicationTracker"],
button[onclick*="openSpecificTracker"] {
    background: transparent;
    color: white !important;
    border: none !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease !important;
}

.profile-edit-btn:hover,
button[onclick*="openSpecificTracker"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ========================================
   EDIT MODE
   ======================================== */
.edit-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    z-index: 1000;
    transition: all 0.2s;
}

.edit-mode-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.6);
}

.edit-mode-toggle.active {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.edit-controls {
    display: none;
    gap: 4px;
    margin-top: 8px;
}

.edit-mode .edit-controls {
    display: flex;
}

.edit-btn {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
}

.edit-btn:hover {
    background: #f3f4f6;
    border-color: #6366f1;
}

.edit-btn.delete {
    color: #dc2626;
    border-color: #fecaca;
}

.edit-btn.delete:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.add-item-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-top: 8px;
}

.add-item-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f0f9ff;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
textarea, 
input[type="text"], 
input[type="date"], 
input[type="number"],
input[type="time"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    resize: vertical;
}

textarea:focus, 
input:focus {
    outline: none;
    border-color: #6366f1;
}

label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Date picker specific styling */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* ========================================
   CHECKBOXES
   ======================================== */
.checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkbox.checked {
    background: #10b981;
    border-color: #10b981;
}

.checkbox svg {
    display: none;
}

.checkbox.checked svg {
    display: block;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #1a202c;
}

.modal-footer {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.modal-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.primary {
    background: #6366f1;
    color: white;
}

.modal-btn.primary:hover {
    background: #4f46e5;
}

.modal-btn.secondary {
    background: #e5e7eb;
    color: #374151;
}

.modal-btn.secondary:hover {
    background: #d1d5db;
}

/* Form Groups in Modals */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
}

/* Task Edit List in Modals */
.task-edit-list {
    list-style: none;
    margin-bottom: 12px;
}

.task-edit-item {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.task-edit-item input {
    flex: 1;
}

.edit-input {
    width: 100%;
    padding: 6px 8px;
    border: 2px solid #6366f1;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}

.edit-input:focus {
    outline: none;
    border-color: #4f46e5;
}

/* Tracker Modal Sizing */
#med-tracker-modal .modal-content {
    max-width: 900px;
    max-height: 90vh;
}

/* Template Grid in Modals */
#template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ========================================
   PROFILE COMPONENTS
   ======================================== */
.profile-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Photo Upload Area */
.photo-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.photo-upload-area:hover {
    border-color: #6366f1;
    background: #f0f9ff;
}

.photo-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    margin: 12px auto;
}

/* Color Palette Selection */
.color-palette-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.color-palette-option {
    padding: 16px;
    border: 3px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.color-palette-option:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.color-palette-option.selected {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.color-palette-preview {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 8px;
}

.color-palette-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.color-palette-name {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

/* Crop Tool */
.crop-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
    display: none;
}

.crop-container.active {
    display: block;
}

.crop-image {
    max-width: 100%;
    display: block;
}

.crop-overlay {
    position: absolute;
    border: 2px dashed #6366f1;
    background: rgba(99, 102, 241, 0.1);
    cursor: move;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #6366f1;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
}

.crop-handle.nw { top: -6px; left: -6px; cursor: nw-resize; }
.crop-handle.ne { top: -6px; right: -6px; cursor: ne-resize; }
.crop-handle.sw { bottom: -6px; left: -6px; cursor: sw-resize; }
.crop-handle.se { bottom: -6px; right: -6px; cursor: se-resize; }
.crop-handle.n { top: -6px; left: 50%; margin-left: -6px; cursor: n-resize; }
.crop-handle.s { bottom: -6px; left: 50%; margin-left: -6px; cursor: s-resize; }
.crop-handle.w { top: 50%; left: -6px; margin-top: -6px; cursor: w-resize; }
.crop-handle.e { top: 50%; right: -6px; margin-top: -6px; cursor: e-resize; }

.crop-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}

.crop-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.crop-btn.primary {
    background: #6366f1;
    color: white;
}

.crop-btn.primary:hover {
    background: #4f46e5;
}

.crop-btn.secondary {
    background: #e5e7eb;
    color: #374151;
}

.crop-btn.secondary:hover {
    background: #d1d5db;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */
.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

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

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px 40px;
}

.child-selector-date-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.schedule-character-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1 {
    font-size: 32px;
    color: #1a202c;
    margin-bottom: 8px;
}

h2 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

h3 {
    font-size: 16px;
    color: #2d3748;
    margin-bottom: 8px;
}

.subtitle {
    color: #718096;
    font-size: 16px;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.scrollable {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

/* ========================================
   HIDDEN LEGACY ELEMENTS
   ======================================== */
#child-buttons-container,
#add-child-btn {
    display: none !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* ========================================
   RESPONSIVE DESIGN - Mobile, Tablet, Desktop
   ======================================== */

/* Mobile Portrait (320px - 767px) */
@media (max-width: 767px) {
    body {
        padding: 0;
        height: auto;
        overflow: auto;
        min-height: 100vh;
    }
    
    .app-container {
        background: #fafafa;
        display: flex;
        height: auto;
        min-height: 100vh;
        max-width: none;
        width: 100vw;
        margin: 0;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        overflow: visible;
    }
    
    .sidebar {
        width: 90px;
        padding: 16px 4px;
        gap: 16px;
    }
    
    .sidebar-avatar {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }
    
    .utility-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .compass-logo {
        width: 28px;
        height: 28px;
    }
    
    .score-bar {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 12px;
        height: auto;
        min-height: auto;
    }
    
    .schedule-section,
    .detail-section,
    .goals-section {
        overflow-y: visible;
    }
    
    .container {
        padding: 0;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    /* Tracker modal full screen on mobile */
    #med-tracker-modal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow-y: auto;
    }
    
    #med-tracker-modal .modal-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        padding: 16px !important;
        border-bottom: 2px solid #e5e7eb;
        font-size: 16px !important;
    }
    
    /* Profile modal stays normal */
    #profile-modal .modal-content {
        width: 95% !important;
        max-width: 500px !important;
    }
    
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 10;
        padding: 16px !important;
        border-top: 2px solid #e5e7eb;
    }
    
    .modal-btn {
        width: 100% !important;
        margin-bottom: 8px !important;
    }
    
    .grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    #template-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .modal-content {
        width: 90% !important;
        max-width: 700px !important;
    }
    
    #template-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Tablet Landscape - Single Screen View */
@media (min-width: 768px) and (orientation: landscape) {
    body {
        overflow-y: auto;
    }
    
    .container {
        background: transparent !important;
    }
    
    .container > .card:first-child {
        padding: 16px !important;
        margin-bottom: 12px !important;
    }
    
    .container > .card:first-child h1 {
        font-size: 24px !important;
        margin-bottom: 4px !important;
    }
    
    .dashboard-grid {
        display: grid !important;
        grid-template-columns: 1fr 2fr !important;
        gap: 12px !important;
        margin-bottom: 12px !important;
    }
    
    .left-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .right-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .grid-4 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .card {
        padding: 16px !important;
        margin-bottom: 0 !important;
    }
    
    .stat-card {
        padding: 12px !important;
    }
    
    .stat-card .stat-value {
        font-size: 24px !important;
    }
    
    .schedule-character-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
    
    h2 {
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }
    
    #med-tracker-modal .modal-content {
        max-width: 95vw !important;
        max-height: 90vh !important;
        width: 95vw !important;
    }
}

/* Desktop (1024px+) - Maintain viewport height locking */
@media (min-width: 1024px) {
    body {
        height: 100vh;
        overflow: hidden;
    }
    
    .app-container {
        height: 100vh;
        overflow: hidden;
    }
    
    .container {
        max-width: 100% !important;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .schedule-character-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .card {
        padding: 20px;
    }
    
    h1 {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    #med-tracker-modal .modal-content {
        max-width: 1200px !important;
        max-height: 90vh !important;
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    #med-tracker-modal .modal-content {
        max-width: 1400px !important;
    }
}

/* Medium Desktop (1200px+) - For 3-column layout */
@media (max-width: 1200px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .score-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Landscape orientation with short height */
@media (orientation: landscape) and (max-height: 600px) {
    .modal-content {
        height: 100vh !important;
        max-height: 100vh !important;
    }
    
    .modal-header {
        padding: 12px !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    button, input[type="radio"], input[type="checkbox"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card {
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .modal, button {
        display: none !important;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Tracker modal tabs */
.tracker-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s;
}

.tracker-tab:hover {
    color: #374151;
    background: #f9fafb;
}

.tracker-tab.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}

.tracker-tab-content {
    display: none;
}

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

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.close-btn:hover {
    background: #dc2626;
    transform: rotate(90deg);
}

/* Make sure modal-header has relative positioning */
.modal-header {
    position: relative;
    padding-right: 60px; /* Space for the close button */
}

/* Score Value - use theme colors */
.score-value {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-gradient-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.score-action-btn {
    margin-top: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-gradient-1));
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.score-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Schedule Items */
.schedule-item:hover {
    border-color: var(--theme-accent);
    transform: translateX(2px);
}

.schedule-item.in-focus {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    border-color: var(--theme-accent);
    border-width: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

.schedule-time {
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-accent);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.schedule-status-badge.pending {
    background: var(--theme-accent-light);
    color: var(--theme-accent-hover);
}

/* Detail Section */
.detail-time {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-gradient-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.progress-fill-mini {
    background: linear-gradient(90deg, var(--theme-accent), var(--theme-gradient-1));
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

/* Task Items */
.task-item:hover {
    background: var(--theme-accent-light);
    border-color: var(--theme-accent);
    transform: translateX(2px);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--theme-accent);
}

/* Complete Button */
.complete-btn {
    margin-top: 20px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-gradient-1));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transition: all 0.2s;
    letter-spacing: -0.2px;
    width: 100%;
}

.complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

/* Weekly Goals */
.weekly-goal-item:hover,
.chore-item:hover {
    background: var(--theme-accent-light);
    border-color: var(--theme-accent);
    transform: translateX(2px);
}

.weekly-goal-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--theme-accent);
}

/* Sidebar Tracker Button */
.sidebar-tracker-btn {
    width: calc(100% - 16px);
    margin: 0 8px 6px 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--theme-gradient-secondary-1) 0%, var(--theme-gradient-secondary-2) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-align: left;
    position: relative;
    z-index: 1001;
}

.sidebar-tracker-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Utility Bar */
.utility-btn:hover {
    border-color: var(--theme-accent);
    background: var(--theme-accent-light);
}

.utility-btn.active {
    background: var(--theme-accent);
    color: white;
    border-color: var(--theme-accent);
}

.date-picker-mini:hover {
    border-color: var(--theme-accent);
}

.date-picker-mini:focus {
    outline: none;
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn-primary {
    background: var(--theme-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--theme-accent-hover);
    transform: scale(1.02);
}

.btn-active {
    background: var(--theme-accent);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Character Lists */
.character-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--theme-accent);
}

/* Edit Mode Toggle */
.edit-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-hover));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    z-index: 1000;
    transition: all 0.2s;
}

.edit-mode-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.6);
}

.edit-btn:hover {
    background: #f3f4f6;
    border-color: var(--theme-accent);
}

.add-item-btn:hover {
    border-color: var(--theme-accent);
    color: var(--theme-accent);
    background: var(--theme-accent-light);
}

/* Form Elements */
textarea:focus, 
input:focus {
    outline: none;
    border-color: var(--theme-accent);
}

/* Modal Buttons */
.modal-btn.primary {
    background: var(--theme-accent);
    color: white;
}

.modal-btn.primary:hover {
    background: var(--theme-accent-hover);
}

.form-input:focus {
    outline: none;
    border-color: var(--theme-accent);
}

.edit-input:focus {
    outline: none;
    border-color: var(--theme-accent-hover);
}

/* Color Palette Selection */
.color-palette-option.selected {
    border-color: var(--theme-accent);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Crop Tool */
.crop-overlay {
    position: absolute;
    border: 2px dashed var(--theme-accent);
    background: rgba(99, 102, 241, 0.1);
    cursor: move;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--theme-accent);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
}

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

.crop-btn.primary:hover {
    background: var(--theme-accent-hover);
}

/* Tracker Tabs */
.tracker-tab.active {
    color: var(--theme-accent);
    border-bottom-color: var(--theme-accent);

/* Rewards Grid */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.rewards-category-header {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    padding: 12px 0 8px 0;
    border-bottom: 2px solid #e5e7eb;
    margin-top: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.reward-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reward-card:hover:not(.disabled) {
    border-color: var(--theme-gradient-2, #6366f1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.reward-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reward-card.purchased {
    background: #f0fdf4;
    border-color: #22c55e;
}

.purchased-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #22c55e;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.reward-icon {
    font-size: 40px;
    text-align: center;
}

.reward-info {
    flex: 1;
}

.reward-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.3;
}

.reward-cost {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.cost-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--theme-gradient-2, #6366f1);
}

.cost-label {
    font-size: 12px;
    color: #6b7280;
}

.reward-purchase-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--theme-gradient-1, #a78bfa), var(--theme-gradient-2, #6366f1));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reward-purchase-btn:hover:not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.reward-purchase-btn.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.reward-edit-controls {
    display: flex;
    gap: 6px;
}

.reward-edit-btn,
.reward-delete-btn {
    flex: 1;
    padding: 6px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.reward-edit-btn {
    background: #6366f1;
    color: white;
}

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

.add-reward-btn {
    grid-column: 1/-1;
    padding: 14px;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-reward-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #374151;
}
