:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

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

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

/* Entry Cards */
.entry-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.entry-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.entry-child {
    font-weight: 600;
    color: var(--primary-color);
}

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

.entry-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.entry-detail {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.entry-notes {
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.entry-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Child Cards */
.child-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.child-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.child-card.selected {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(79, 70, 229, 0.05));
}

.child-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.child-notes {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.child-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Statistics */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

/* Login/Register */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
}

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

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

.badge-warning {
    background: var(--warning-color);
    color: white;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 60px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        transition: right 0.3s ease;
        box-shadow: var(--shadow-xl);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .entry-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.75rem 0;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
}

/* Likert Scale Styles */
.likert-scale {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.25rem 0;
}

.likert-scale-label {
    min-width: 80px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.likert-dots {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.likert-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
}

.likert-dot.active {
    transform: scale(1.3);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Effort scale colors (1-20, displayed as 1-5) */
.likert-dot.effort-1.active { background-color: var(--success-color); border-color: var(--success-color); }
.likert-dot.effort-2.active { background-color: #84cc16; border-color: #84cc16; }
.likert-dot.effort-3.active { background-color: var(--warning-color); border-color: var(--warning-color); }
.likert-dot.effort-4.active { background-color: var(--danger-color); border-color: var(--danger-color); }

/* Consistency scale colors (1-20, displayed as 1-5) */
.likert-dot.consistency-1.active { background-color: #3b82f6; border-color: #3b82f6; }
.likert-dot.consistency-2.active { background-color: #06b6d4; border-color: #06b6d4; }
.likert-dot.consistency-3.active { background-color: var(--success-color); border-color: var(--success-color); }
.likert-dot.consistency-4.active { background-color: var(--warning-color); border-color: var(--warning-color); }
.likert-dot.consistency-5.active { background-color: var(--danger-color); border-color: var(--danger-color); }

/* Amount scale colors (1-20, displayed as 1-5) */
.likert-dot.amount-1.active { background-color: #fbbf24; border-color: #fbbf24; }
.likert-dot.amount-2.active { background-color: #84cc16; border-color: #84cc16; }
.likert-dot.amount-3.active { background-color: var(--success-color); border-color: var(--success-color); }
.likert-dot.amount-4.active { background-color: #f97316; border-color: #f97316; }
.likert-dot.amount-5.active { background-color: var(--danger-color); border-color: var(--danger-color); }

.likert-value {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-left: 0.5rem;
    min-width: 60px;
}

/* Enhanced Entry Cards */
.entry-card-new {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: all 0.2s ease;
}

.entry-card-new:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

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

.entry-child-new {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.entry-date-new {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.entry-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.entry-metric {
    text-align: center;
}

.entry-metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.entry-notes-new {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.entry-actions-new {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* Enhanced Entry Cards - More Informative */
.entry-card-enhanced {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.entry-card-enhanced:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.entry-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.entry-status-bar {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--danger-color));
    opacity: 0.7;
}

.entry-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.entry-main-info {
    flex: 1;
}

.entry-child-enhanced {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.entry-time-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.entry-score-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-align: center;
    min-width: 80px;
}

.entry-score-label {
    font-size: 0.75rem;
    opacity: 0.9;
    display: block;
}

.entry-score-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.entry-metrics-enhanced {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.entry-metric-enhanced {
    text-align: center;
    position: relative;
}

.entry-metric-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.entry-metric-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.metric-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.metric-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color));
}

.metric-progress-fill.high {
    background: linear-gradient(90deg, var(--warning-color), var(--danger-color));
}

.metric-value-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.metric-value-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.metric-severity-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.severity-low { background-color: var(--success-color); }
.severity-medium { background-color: var(--warning-color); }
.severity-high { background-color: var(--danger-color); }

.entry-detailed-view {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin: 1rem 0;
}

.entry-primary-data {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.entry-summary-stats {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.entry-tags {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.entry-tag {
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 500;
}

.entry-tag.difficulty-easy { background-color: var(--success-color); }
.entry-tag.difficulty-normal { background-color: var(--info-color); }
.entry-tag.difficulty-hard { background-color: var(--warning-color); }
.entry-tag.difficulty-very-hard { background-color: var(--danger-color); }

/* Time-based indicator colors */
.entry-tag.difficulty-success { background-color: var(--success-color); }
.entry-tag.difficulty-info { background-color: var(--info-color); }
.entry-tag.difficulty-warning { background-color: var(--warning-color); }
.entry-tag.difficulty-danger { background-color: var(--danger-color); }

.entry-notes-enhanced {
    background: #f8fafc;
    border-left: 4px solid var(--info-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.entry-actions-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.entry-timestamp {
    font-size: 0.75rem;
    color: var(--text-light);
}

.entry-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.visual-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.scale-point {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: white;
    transition: all 0.2s ease;
}

.scale-point.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .entry-metrics {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .entry-metrics-enhanced {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .entry-detailed-view {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .likert-scale {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .entry-header-new, .entry-header-enhanced {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .entry-actions-enhanced {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .entry-action-buttons {
        justify-content: center;
    }
}

/* Explanation and Tooltip Styles */
.explanation-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.explanation-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.explanation-content {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.explanation-content:last-child {
    margin-bottom: 0;
}

.metric-explanation {
    background: white;
    border-left: 4px solid var(--info-color);
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.8rem;
}

.help-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    color: var(--info-color);
    margin-left: 0.25rem;
}

.help-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

.tooltip-content {
    visibility: hidden;
    opacity: 0;
    background-color: var(--text-primary);
    color: white;
    text-align: left;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    width: 300px;
    font-size: 0.8rem;
    line-height: 1.4;
    transition: opacity 0.3s;
    box-shadow: var(--shadow-lg);
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

.analysis-expandable {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 0.5rem 0;
    overflow: hidden;
}

.analysis-header {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.analysis-header:hover {
    background: var(--bg-tertiary);
}

.analysis-toggle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.analysis-body {
    display: none;
    padding: 1rem;
    background: white;
}

.analysis-body.expanded {
    display: block;
}

.analysis-expandable.expanded .analysis-toggle {
    transform: rotate(180deg);
}

.health-context {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1rem 0;
}

.health-context-title {
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.health-tip {
    background: #fefce8;
    border: 1px solid #fbbf24;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.health-tip-icon {
    color: #f59e0b;
    margin-right: 0.5rem;
}

.score-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
}

.score-component {
    text-align: center;
    padding: 0.5rem;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.score-component-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.score-component-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.score-component-weight {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .tooltip-content {
        width: 250px;
        margin-left: -125px;
        font-size: 0.75rem;
    }
    
    .score-breakdown {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .entry-metrics-enhanced {
        grid-template-columns: 1fr !important;
    }
    
    .health-context {
        padding: 0.75rem;
    }
    
    .dashboard-child-card {
        margin: 0.75rem 0;
    }
    
    .dashboard-child-card .entry-header-enhanced {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .dashboard-prediction-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
}

/* Modern Recent Entries Styling */
.modern-entry-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.modern-entry-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.modern-entry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.modern-entry-card:hover::before {
    width: 6px;
}

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

.modern-entry-info {
    flex: 1;
}

.modern-entry-child {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-entry-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.modern-entry-score {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    text-align: center;
    min-width: 70px;
    font-weight: 600;
}

.modern-entry-score .score-grade {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.1rem;
}

.modern-entry-score .score-text {
    font-size: 0.7rem;
    opacity: 0.9;
}

.modern-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.modern-metric {
    text-align: center;
    position: relative;
}

.modern-metric-icon {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    display: block;
}

.modern-metric-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.modern-metric-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modern-metric-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.modern-metric-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s ease;
}

.modern-metric-fill.effort-1 { background: var(--success-color); }
.modern-metric-fill.effort-2 { background: #84cc16; }
.modern-metric-fill.effort-3 { background: var(--warning-color); }
.modern-metric-fill.effort-4 { background: var(--danger-color); }

.modern-metric-fill.consistency-1 { background: #3b82f6; }
.modern-metric-fill.consistency-2 { background: #06b6d4; }
.modern-metric-fill.consistency-3 { background: var(--success-color); }
.modern-metric-fill.consistency-4 { background: var(--warning-color); }
.modern-metric-fill.consistency-5 { background: var(--danger-color); }

.modern-metric-fill.amount-1 { background: #fbbf24; }
.modern-metric-fill.amount-2 { background: #84cc16; }
.modern-metric-fill.amount-3 { background: var(--success-color); }
.modern-metric-fill.amount-4 { background: #f97316; }
.modern-metric-fill.amount-5 { background: var(--danger-color); }

.modern-entry-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--info-color);
}

.modern-entry-time-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-align: center;
}

.modern-entry-time-badge.success { background: var(--success-color); }
.modern-entry-time-badge.info { background: var(--info-color); }
.modern-entry-time-badge.warning { background: var(--warning-color); }
.modern-entry-time-badge.danger { background: var(--danger-color); }

.modern-entry-health-indicators {
    display: flex;
    gap: 0.5rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}

.modern-health-indicator {
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.modern-health-indicator.severity-low { 
    background: rgba(16, 185, 129, 0.1); 
    border-color: var(--success-color); 
    color: var(--success-color);
}

.modern-health-indicator.severity-medium { 
    background: rgba(245, 158, 11, 0.1); 
    border-color: var(--warning-color); 
    color: var(--warning-color);
}

.modern-health-indicator.severity-high { 
    background: rgba(239, 68, 68, 0.1); 
    border-color: var(--danger-color); 
    color: var(--danger-color);
}

.modern-entry-notes {
    background: #fefce8;
    border: 1px solid #fbbf24;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
}

.modern-entry-notes::before {
    content: '💬';
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-style: normal;
}

.modern-entry-notes .notes-content {
    margin-left: 1.5rem;
}

/* Modern Entries Grid Layout */
.modern-entries-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

/* Modern Entry Header */
.modern-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.entry-child-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.entry-child-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.entry-timestamp {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Health Score Badge */
.health-score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.health-score-grade {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.health-score-text {
    font-size: 0.7rem;
    opacity: 0.9;
    margin-top: 0.15rem;
}

/* Health Progress */
.health-progress-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.health-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.health-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.health-score-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 40px;
}

/* Modern Entry Metrics */
.modern-entry-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.metric-icon {
    font-size: 0.9rem;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.metric-value {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.25rem;
}

/* Time Analysis */
.time-analysis {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin: 0.75rem 0;
}

.time-analysis-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.time-icon {
    font-size: 0.9rem;
}

.time-status {
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 1.4rem;
}

/* Severity Indicator */
.severity-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0.75rem 0;
}

.severity-indicator.severity-low {
    background: #f0fdf4;
    border: 1px solid #22c55e;
    color: #15803d;
}

.severity-indicator.severity-medium {
    background: #fefce8;
    border: 1px solid #eab308;
    color: #a16207;
}

.severity-indicator.severity-high {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #dc2626;
}

.severity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.severity-text {
    font-weight: 600;
}

/* Modern Entry Notes */
.modern-entry-notes {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #fefce8;
    border: 1px solid #fbbf24;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.notes-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.notes-content {
    flex: 1;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .modern-metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .modern-entry-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .modern-entry-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .modern-entry-health-indicators {
        justify-content: center;
    }
    
    .modern-entry-metrics {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .health-progress-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
}

/* Slider Styles */
.slider-group {
    margin-bottom: 1.5rem;
}

.slider-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.slider-container {
    position: relative;
    margin: 1rem 0;
}

.slider-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, 
        #ef4444 0%,     /* Red (bad) */
        #f59e0b 25%,    /* Orange */
        #10b981 50%,    /* Green (good) */
        #f59e0b 75%,    /* Orange */
        #ef4444 100%    /* Red (bad) */
    );
    border-radius: 4px;
    position: relative;
}

.slider-input {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: transparent;
    outline: none;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    border-color: var(--primary-dark);
}

.slider-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.slider-value-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.slider-value-text {
    font-weight: 600;
    color: var(--text-primary);
}

.slider-value-number {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* Slider Icons */
.slider-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Effort-specific colors */
.slider-effort .slider-track {
    background: linear-gradient(90deg, 
        #10b981 0%,     /* Green (easy) */
        #f59e0b 50%,    /* Orange (normal) */
        #ef4444 100%    /* Red (difficult) */
    );
}

/* Consistency-specific colors */
.slider-consistency .slider-track {
    background: linear-gradient(90deg, 
        #ef4444 0%,     /* Red (liquid) */
        #f59e0b 25%,    /* Orange (soft) */
        #10b981 50%,    /* Green (normal) */
        #f59e0b 75%,    /* Orange (hard) */
        #ef4444 100%    /* Red (very hard) */
    );
}

/* Amount-specific colors */
.slider-amount .slider-track {
    background: linear-gradient(90deg, 
        #f59e0b 0%,     /* Orange (very little) */
        #10b981 50%,    /* Green (normal) */
        #f59e0b 100%    /* Orange (too much) */
    );
}