* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --primary-hover: #357ABD;
    --secondary-color: #50C878;
    --background: #f5f7fa;
    --card-bg: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border: #e1e4e8;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Updates */
header {
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    padding: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid var(--border);
}

.header-left h1 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--primary-color);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0;
    background: var(--background);
    padding: 0;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
}

.tab-btn:hover {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.tab-icon {
    font-size: 1.3rem;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    display: block;
}

/* Today Tab Layout */
.today-layout {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.today-main {
    max-width: 600px;
    margin: 0 auto;
}

/* Compact Info Box (top-right) */
.info-box {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: white;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.info-value {
    font-weight: 700;
    font-size: 1rem;
}

/* Quick Add Buttons */
.quick-add-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 25px 0;
}

.quick-add-btn {
    padding: 15px 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(74, 144, 226, 0.3);
}

.quick-add-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(74, 144, 226, 0.4);
}

.quick-add-btn:active {
    transform: translateY(-1px);
}

.quick-add-btn.custom {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.custom-input-container {
    margin: 20px 0;
    padding: 20px;
    background: var(--background);
    border-radius: 10px;
}

section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Date Selector */
.date-selector {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-selector label {
    font-weight: 600;
}

.date-selector input {
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

/* Visual Container */
.visual-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(to bottom, #e3f2fd 0%, #f5f5f5 100%);
    border-radius: 12px;
}

.creature-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.creature-display {
    font-size: 5rem;
    line-height: 1;
    margin: 20px 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.creature-display::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: var(--fill-height, 0%);
    background: linear-gradient(to top, rgba(74, 144, 226, 0.3), transparent);
    border-radius: 8px;
    z-index: 0;
    transition: height 0.5s ease;
}

.creature-display span {
    position: relative;
    z-index: 1;
}

.fill-indicator {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 15px;
}

.fill-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 15px;
    width: 0%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Intake Form */
.intake-form {
    display: grid;
    gap: 20px;
}

.goal-setting,
.intake-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.goal-setting label,
.intake-input label {
    font-weight: 600;
    min-width: 150px;
}

input[type="number"] {
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    flex: 1;
    min-width: 120px;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-primary,
.btn-secondary {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background: var(--background);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}


/* Calendar */
.calendar-header h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-controls h3 {
    color: var(--text-dark);
    font-size: 1.2rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    max-width: 100%;
    margin: 20px 0;
}

/* Full Width Calendar */
.calendar-fullwidth {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.calendar-fullwidth .calendar-day {
    aspect-ratio: 1;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-fullwidth .calendar-day:hover {
    transform: scale(1.08);
    z-index: 10;
}

.calendar-fullwidth .date-num {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.calendar-fullwidth .intake-indicator {
    font-size: 1.5rem;
}

.calendar-footer {
    margin-top: 30px;
    padding: 20px;
    background: var(--background);
    border-radius: 10px;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--border);
}

.month-summary {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.calendar-day {
    aspect-ratio: unset !important;  /* Remove square constraint for rectangular boxes */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px 4px;
    font-size: 0.8rem;
    min-height: 55px;
    max-height: 55px;
    background: white;
}

.calendar-day:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.calendar-day.header {
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    cursor: default;
    border: none;
}

.calendar-day.header:hover {
    transform: none;
    box-shadow: none;
}

.calendar-day.empty {
    border: none;
    cursor: default;
}

.calendar-day.empty:hover {
    transform: none;
}

.calendar-day.today {
    border-color: var(--primary-color);
    background: rgba(74, 144, 226, 0.1);
    font-weight: 600;
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.calendar-day .date-num {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.calendar-day .intake-indicator {
    font-size: 0.65rem;
    color: var(--text-light);
}

.calendar-day.level-100 {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.calendar-day.level-75 {
    background: #90ee90;
    border-color: #90ee90;
}

.calendar-day.level-50 {
    background: #ffc107;
    border-color: #ffc107;
}

.calendar-day.level-25 {
    background: #ffeb99;
    border-color: #ffeb99;
}

.calendar-day.level-0 {
    background: #ffcccb;
    border-color: #ffcccb;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.stat-excellent .stat-icon { animation-delay: 0s; }
.stat-good .stat-icon { animation-delay: 0.2s; }
.stat-moderate .stat-icon { animation-delay: 0.4s; }
.stat-low .stat-icon { animation-delay: 0.6s; }
.stat-minimal .stat-icon { animation-delay: 0.8s; }

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 500;
}

.stat-bar {
    width: 100%;
    height: 6px;
    background: #e1e4e8;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.stat-excellent .stat-value { color: #28a745; }
.stat-excellent .stat-bar-fill { background: linear-gradient(90deg, #28a745, #20c997); }

.stat-good .stat-value { color: #90ee90; }
.stat-good .stat-bar-fill { background: linear-gradient(90deg, #90ee90, #20c997); }

.stat-moderate .stat-value { color: #ffc107; }
.stat-moderate .stat-bar-fill { background: linear-gradient(90deg, #ffc107, #ffca28); }

.stat-low .stat-value { color: #ff9800; }
.stat-low .stat-bar-fill { background: linear-gradient(90deg, #ff9800, #ffa726); }

.stat-minimal .stat-value { color: #dc3545; }
.stat-minimal .stat-bar-fill { background: linear-gradient(90deg, #dc3545, #e57373); }

.stats-summary {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    flex-wrap: wrap;
    gap: 15px;
}

.streak-counter {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.streak-counter span {
    font-size: 1.5rem;
    font-weight: 700;
}

.total-days {
    font-size: 1rem;
}

.total-days span {
    font-weight: 700;
    font-size: 1.2rem;
}

/* Circular Progress Indicator */
.circular-progress {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 30px auto;
}

.progress-ring {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.progress-ring-circle-bg {
    fill: none;
    stroke: #e1e4e8;
    stroke-width: 6;
}

.progress-ring-circle {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 326;
    stroke-dashoffset: 326;
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-percentage {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* Success Animation */
@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

.confetti {
    position: fixed;
    font-size: 2rem;
    animation: confetti 3s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

/* Button Ripple Effect */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after, .btn-secondary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after, .btn-secondary:active::after {
    width: 300px;
    height: 300px;
}

/* Enhanced Calendar */
.calendar-day {
    position: relative;
}

.calendar-day.today {
    box-shadow: 0 0 0 3px var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--primary-color); }
    50% { box-shadow: 0 0 0 6px var(--primary-color); }
}

.calendar-day:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Export Section */
.export-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.date-range {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.date-input-group label {
    font-weight: 600;
    color: var(--text-dark);
}

.date-input-group input[type="date"] {
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.date-input-group input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.export-controls .btn-primary {
    align-self: flex-start;
}

.success-feedback {
    background: var(--success) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .tab-btn .tab-label {
        display: none;
    }
    
    .tab-icon {
        font-size: 1.5rem;
    }
    
    .info-box {
        position: static;
        margin-bottom: 20px;
    }
    
    .quick-add-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendar-fullwidth {
        gap: 6px;
    }
    
    .calendar-fullwidth .calendar-day {
        min-height: 60px;
        font-size: 0.85rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .creature-display {
        font-size: 3rem;
    }

    .calendar-grid {
        gap: 2px;
    }

    .calendar-day {
        font-size: 0.75rem;
        padding: 4px 2px;
        min-height: 45px;
        max-height: 45px;
    }
    
    .calendar-day .date-num {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }
    
    .calendar-day .intake-indicator {
        font-size: 0.6rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-summary {
        flex-direction: column;
        text-align: center;
    }

    .date-range {
        flex-direction: column;
    }

    .date-input-group {
        width: 100%;
    }

    .export-controls .btn-primary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .calendar-fullwidth {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }
    
    .calendar-fullwidth .calendar-day {
        min-height: 50px;
        padding: 4px;
    }
    
    .calendar-fullwidth .date-num {
        font-size: 0.9rem;
    }
    
    .calendar-fullwidth .intake-indicator {
        font-size: 1rem;
    }

    .calendar-grid {
        gap: 1px;
    }

    .calendar-day {
        min-height: 40px;
        max-height: 40px;
        font-size: 0.7rem;
        padding: 3px 1px;
    }

    .calendar-day .date-num {
        font-size: 0.75rem;
        margin-bottom: 1px;
    }

    .calendar-day .intake-indicator {
        font-size: 0.55rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Settings Section */
/* Note: Settings cards are now wrapped in collapsible-section which provides borders/shadows */
.settings-card {
    background: var(--card-bg);
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
}

/* Settings Groups */
.settings-group {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.settings-group:first-child {
    border-top: none;
}

/* Button Improvements */
.settings-card .btn-primary,
.settings-card .btn-secondary {
    margin-top: 12px;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* Status Messages - Base and Variants */
.status-success,
.status-warning,
.status-info,
.status-error {
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
    border-left-width: 4px;
    border-left-style: solid;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* Collapsible Sections - Enhanced Design */
.collapsible-section {
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
    cursor: pointer;
    user-select: none;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.section-header:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 16px;
    color: white;
}

.section-content {
    overflow: hidden;
    max-height: 3000px; /* Large enough for typical settings content */
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
    padding: 24px;
    opacity: 1;
}

.section-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.settings-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.settings-description {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.setting-label {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 8px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Notification Settings */
.notification-settings {
    margin-top: 20px;
    padding: 20px;
    background: var(--background);
    border-radius: 8px;
}

.reminder-times {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.checkbox-label:hover {
    background: rgba(74, 144, 226, 0.1);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.timezone-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.timezone-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.goal-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.goal-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.user-email-display {
    color: var(--text-light);
    font-size: 0.95rem;
    padding: 10px;
    background: var(--background);
    border-radius: 6px;
}

/* Test Email Section */
.test-email-info {
    background: var(--background);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid var(--border);
}

.test-email-info p {
    margin: 8px 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.test-email-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

.test-note {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

.test-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 500;
    display: none;
    animation: slideIn 0.3s ease;
}

.test-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.test-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button states */
#send-test-email-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Power User Unlock Section */
.power-user-unlock {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 12px;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.power-user-unlock h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.power-user-unlock p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.unlock-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.unlock-input {
    padding: 12px 16px;
    border: 2px solid white;
    border-radius: 6px;
    font-size: 1rem;
    min-width: 250px;
    background: white;
    color: var(--text-dark);
}

.unlock-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.unlock-btn {
    padding: 12px 24px;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unlock-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.unlock-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
}

.unlock-message.success {
    background: rgba(40, 167, 69, 0.2);
    border: 2px solid #28a745;
}

.unlock-message.error {
    background: rgba(220, 53, 69, 0.2);
    border: 2px solid #dc3545;
}

.power-user-unlocked {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    padding: 20px;
    border-radius: 12px;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.power-user-unlocked h3 {
    color: white;
    margin-bottom: 10px;
}

/* Enhanced Reminder Pickers - Compact Design */
.reminder-slot {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.reminder-slot:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.reminder-slot.disabled {
    opacity: 0.5;
    background: #fafbfc;
}

.reminder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.reminder-header h4 {
    margin: 0;
    color: #24292e;
    font-size: 14px;
    font-weight: 600;
}

.reminder-enable {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reminder-enable label {
    font-size: 13px;
    color: #586069;
    cursor: pointer;
    margin: 0;
}

.reminder-enable input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.reminder-time-options {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.reminder-time-options label {
    font-weight: 500;
    font-size: 13px;
    color: #586069;
    min-width: 40px;
}

.time-preset-select {
    flex: 1;
    min-width: 130px;
    padding: 6px 10px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.time-preset-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.time-preset-select:disabled {
    background: var(--background);
    cursor: not-allowed;
}

.custom-time-input {
    flex: 1;
    min-width: 110px;
    padding: 6px 10px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.3s ease;
}

.custom-time-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.custom-time-input:disabled {
    background: var(--background);
    cursor: not-allowed;
}

.time-divider {
    color: #959da5;
    font-weight: 400;
    font-size: 12px;
    font-style: italic;
}

@media (max-width: 768px) {
    .settings-card {
        padding: 20px;
    }
    
    .section-header {
        padding: 12px 15px;
    }
    
    .section-header h3 {
        font-size: 1.1rem;
    }
    
    .unlock-form {
        flex-direction: column;
    }
    
    .unlock-input {
        width: 100%;
    }
    
    .unlock-btn {
        width: 100%;
    }
    
    .reminder-time-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reminder-time-options label {
        min-width: auto;
    }
}

/* EmailJS Configuration Styles */
.emailjs-config {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #ffc107;
}

.config-note {
    color: #856404;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.config-field {
    margin-bottom: 15px;
}

.config-field label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.config-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.config-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.config-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    display: none;
    font-weight: 500;
}

.config-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.config-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Setup Guide Styles */
.settings-group {
    margin-bottom: 20px;
}

.setup-steps {
    background: #f8f9fa;
    padding: 20px 20px 20px 40px;
    border-radius: 8px;
    line-height: 1.8;
    margin: 15px 0;
}

.setup-steps li {
    margin-bottom: 10px;
}

.setup-steps a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.setup-steps a:hover {
    text-decoration: underline;
}

.template-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    cursor: pointer;
}

.template-details summary {
    cursor: pointer;
    user-select: none;
    padding: 5px;
}

.template-details summary:hover {
    color: var(--primary-color);
}

.template-example {
    margin-top: 15px;
}

.template-example p {
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 5px;
}

.template-example pre {
    background: white;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    border: 2px solid var(--border);
    font-size: 0.9rem;
    line-height: 1.6;
}

.emailjs-features {
    background: #e7f5ff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid var(--primary-color);
}

.emailjs-features h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.emailjs-features ul {
    list-style: none;
    padding: 0;
}

.emailjs-features li {
    padding: 8px 0;
    font-size: 0.95rem;
}

.emailjs-features li strong {
    color: var(--primary-color);
}

/* Admin Section Styles - Enhanced */
.collapsible-section.admin-section {
    border: 2px solid #ffc107;
}

.collapsible-section.admin-section .section-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.collapsible-section.admin-section .section-header:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.admin-badge {
    display: inline-block;
    background: #ffc107;
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.admin-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.admin-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.admin-guide {
    margin-top: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.admin-guide summary {
    cursor: pointer;
    font-weight: 600;
    color: #667eea;
    user-select: none;
}

.admin-guide summary:hover {
    color: #764ba2;
}

.admin-status {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-info p {
    margin: 8px 0;
    font-size: 0.9rem;
}

.status-info span {
    font-weight: 600;
    color: #667eea;
}

/* Email System Status Messages */
.email-system-status {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 6px;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    padding: 12px;
    border-radius: 6px;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 12px;
    border-radius: 6px;
}

/* Admin Config message */
.admin-config-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    display: none;
}

.admin-config-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.admin-config-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.admin-config-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* SMTP Config specific styles */
.smtp-config {
    margin-top: 20px;
}

.field-hint {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.field-hint a {
    color: #4A90E2;
    text-decoration: underline;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.admin-actions button {
    flex: 1;
    min-width: 200px;
}

.guide-content {
    padding: 15px 0;
}

.guide-content h4 {
    color: #4A90E2;
    margin-top: 20px;
    margin-bottom: 10px;
}

.guide-note {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 12px;
    margin-top: 15px;
    border-radius: 4px;
}

/* ===== Passcode Lock Screen (Personal Edition) ===== */
.lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.lock-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: lockCardIn 0.4s ease;
}

@keyframes lockCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lock-card.shake {
    animation: lockShake 0.4s ease;
}

@keyframes lockShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.lock-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    animation: lockFloat 3s ease-in-out infinite;
}

@keyframes lockFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.lock-card h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.lock-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.lock-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lock-hint {
    color: var(--text-light);
    font-size: 0.85rem;
    text-align: left;
}

.lock-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 2px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lock-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.lock-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.lock-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.35);
}

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

.lock-error {
    color: var(--danger);
    font-size: 0.88rem;
    margin-top: 14px;
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lock-error.visible {
    opacity: 1;
}

/* Sync indicator in header */
.sync-indicator {
    font-size: 1.1rem;
    cursor: default;
    margin-right: 10px;
    transition: transform 0.6s ease;
    display: inline-block;
}

/* Quick amount inputs (Settings) */
.quick-amount-inputs {
    display: flex;
    gap: 10px;
}

.quick-amount-inputs .goal-input {
    flex: 1;
    min-width: 0;
}

/* Undo button row */
.undo-row {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.undo-btn {
    padding: 10px 24px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.undo-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: #fff5f5;
}

/* Offline banner (hidden unless offline) */
.offline-message {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff8e1;
    color: #8a6d3b;
    border-top: 2px solid #ffe082;
    font-size: 0.9rem;
}

.offline-message.visible {
    display: flex;
}
