/* Health Dashboard Styles */

/* Common Health Components */
.health-container-padding {
    padding: 2rem;
}

.health-icon-faded {
    opacity: 0.3;
    margin-bottom: 1rem;
}

.health-text-spaced {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Health Cards */
.health-card {
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
    border: 1px solid var(--bulma-border);
}

/* Dark mode improvements for health cards */
[data-theme="dark"] .health-card {
    /* box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05); */
}

/* Health Stats */
.health-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bulma-background);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.health-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--bulma-primary);
}

.health-stat-label {
    font-size: 0.9rem;
    color: var(--bulma-text-weak);
    margin-top: 0.5rem;
}

/* Progress Bars */
.progress-bar {
    height: 8px;
    background: var(--bulma-background);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bulma-primary), var(--bulma-primary-light));
    transition: width 0.3s ease;
}

/* Goal Components */
.goal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--bulma-border);
    border-radius: 6px;
    background: var(--bulma-background);
}

.goal-info {
    flex: 1;
}

.goal-progress {
    padding-left: 1rem;
    flex: 0 0 150px;
    text-align: right;
}

/* Chart Container */
.chart-container {
    position: relative;
    max-height: 300px;
    margin-bottom: 1rem;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quick-action-btn {
    flex: 1;
    padding: 1rem;
    border: 2px dashed var(--bulma-border);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: var(--bulma-text);
}

.quick-action-btn:hover {
    border-color: var(--bulma-primary);
    background: var(--bulma-primary-light);
}

/* Dark mode improvements for quick action buttons */
[data-theme="dark"] .quick-action-btn:hover {
    background: rgba(72, 199, 116, 0.15);
    border-color: #48c774;
}

/* Recent Activity */
.recent-activity {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--bulma-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

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

.activity-content {
    flex: 1;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.activity-type {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--bulma-text-weak);
}

.activity-type i {
    font-size: 0.65rem;
}

.activity-details {
    margin-top: 0.25rem;
}

.activity-notes {
    font-size: 0.75rem;
    color: var(--bulma-text-weak);
    font-style: italic;
    margin-top: 0.25rem;
    padding: 0.25rem;
    background: var(--bulma-background);
    border-radius: 3px;
    border-left: 2px solid var(--bulma-primary-light);
}

.activity-date {
    font-size: 0.8rem;
    color: var(--bulma-text-weak);
    white-space: nowrap;
    margin-left: 0.5rem;
}

/* Dark mode improvements for activity items */
[data-theme="dark"] .activity-notes {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #48c774;
}

/* Goals Page Specific Styles */
.goals-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.goal-card {
    border: 1px solid var(--bulma-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--bulma-background);
    transition: box-shadow 0.3s ease;
}

.goal-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Dark mode improvements for goal cards */
[data-theme="dark"] .goal-card {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .goal-card:hover {
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}

.goal-card.hidden {
    display: none;
}

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

.goal-actions {
    display: flex;
    gap: 0.5rem;
}

/* Goal Type Badges */
.goal-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}


.goal-type-nutrition {
    background: #e3f2fd;
    color: #1565c0;
}

.goal-type-fitness {
    background: #f3e5f5;
    color: #7b1fa2;
}


/* Goal Status Badges */
.goal-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.goal-status-active {
    background: #e8f5e8;
    color: #2d5a2d;
}

.goal-status-completed {
    background: #e3f2fd;
    color: #1565c0;
}

.goal-status-paused {
    background: #fff3e0;
    color: #8b4513;
}

.goal-status-cancelled {
    background: #ffebee;
    color: #c62828;
}

/* Enhanced styling for completed goals */
.goal-card[data-status="completed"] {
    position: relative;
    background: linear-gradient(135deg, #f8fffe 0%, #f0f9ff 100%);
    border: 1px solid #a7f3d0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}
/* 
.goal-card[data-status="completed"]:before {
    content: "✓";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    z-index: 1;
} */

/* .goal-card[data-status="completed"] .goal-header {
    padding-right: 3.5rem; 
} */

.goal-card[data-status="completed"] .goal-progress {
    opacity: 0.8;
}

/* Dark mode adjustments for completed goals */
[data-theme="dark"] .goal-card[data-status="completed"] {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    border-color: #059669;
}

[data-theme="dark"] .goal-card[data-status="completed"]:before {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Goal Deadline */
.goal-deadline {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--bulma-text-weak);
}

.goal-deadline.urgent {
    color: var(--bulma-danger);
    font-weight: 600;
}

/* Filter Section */
.filter-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bulma-background);
    border-radius: 8px;
    border: 1px solid var(--bulma-border);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--bulma-border);
    border-radius: 6px;
    background: var(--bulma-background);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover,
.filter-button.active {
    background: var(--bulma-primary);
    color: var(--bulma-primary-invert);
    border-color: var(--bulma-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--bulma-text-weak);
}

.empty-state .page-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.button.is-small .icon i {
    font-size: 0.75rem !important;
}

.button.is-large .icon i {
    font-size: 1.25rem !important;
}

/* Form Validation Styles */
.field .help.is-danger {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: #ff3860;
}

.input.is-danger,
.textarea.is-danger,
.select select.is-danger {
    border-color: #ff3860;
    box-shadow: 0 0 0 0.125em rgba(255, 56, 96, 0.25);
}

.input.is-danger:focus,
.textarea.is-danger:focus,
.select select.is-danger:focus {
    border-color: #ff3860;
    box-shadow: 0 0 0 0.125em rgba(255, 56, 96, 0.25);
}

/* Success state for validated fields */
.input.is-success,
.textarea.is-success,
.select select.is-success {
    border-color: #48c774;
    box-shadow: 0 0 0 0.125em rgba(72, 199, 116, 0.25);
}

/* Dark mode improvements for health stats */
[data-theme="dark"] .health-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .health-stat-value {
    color: #3e8ed0;
}

/* Dark mode improvements for progress bars */
[data-theme="dark"] .progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

/* Progress View Modal Styles */
.progress-summary {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bulma-background);
    border-radius: 8px;
    border: 1px solid var(--bulma-border);
}

.progress-indicator-section {
    margin-bottom: 2rem;
}

.progress-entries {
    max-height: 400px;
    overflow-y: auto;
}

.progress-entry {
    padding: 1rem;
    border: 1px solid var(--bulma-border);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: var(--bulma-background);
    transition: all 0.2s ease;
}

.progress-entry:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

[data-theme="dark"] .progress-entry:hover {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

/* Edit Goal Modal Styles */
#editGoalModal .modal-card {
    max-height: 90vh;
    overflow: hidden;
}

#editGoalModal .modal-card-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* View Progress Modal Large Size */
.modal-card.is-large {
    width: 90vw;
    max-width: 1200px;
}

/* Delete Confirmation Modal Styles */
#deleteGoalModal .modal-card {
    max-width: 500px;
}

#deleteGoalModal .icon.has-text-danger {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Loading States */
.modal-card-body .has-text-centered .fa-spinner {
    color: var(--bulma-primary);
}

/* Form Button Improvements */
/* .form-buttons {
    padding-top: 1rem;
    border-top: 1px solid var(--bulma-border);
    margin-top: 1rem;
} */

/* Goal Type Specific Input Sections */
.progress-specific-inputs {
    transition: all 0.3s ease;
}

.progress-specific-inputs.is-hidden {
    display: none;
}

/* Enhanced Modal Animations */
.modal.is-active .modal-card {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Summary Cards */
.progress-summary .column {
    border-right: 1px solid var(--bulma-border);
}

.progress-summary .column:last-child {
    border-right: none;
}

[data-theme="dark"] .progress-summary .column {
    border-right-color: rgba(255, 255, 255, 0.1);
}

/* Enhanced Notification Styles for Progress */
.progress-indicator-section .notification {
    border-left: 4px solid var(--bulma-primary);
}

/* Responsive Modal Improvements */
@media screen and (max-width: 768px) {
    .modal-card.is-large {
        width: 95vw;
        margin: 0 auto;
    }
    
    .progress-summary .columns {
        display: block;
    }
    
    .progress-summary .column {
        border-right: none;
        border-bottom: 1px solid var(--bulma-border);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .progress-summary .column:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
}

[data-theme="dark"] .progress-bar-fill {
    background: linear-gradient(90deg, #3e8ed0, #72c0f4);
}

/* TDEE Calculator Styles */
.tdee-calculator {
    max-width: 1200px;
    margin: 0 auto;
}

.tdee-form-card {
    background: var(--bulma-background);
    border: 1px solid var(--bulma-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .tdee-form-card {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
}

.tdee-results {
    background: var(--bulma-background);
    border: 1px solid var(--bulma-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .tdee-results {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
}

.tdee-result-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--bulma-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.tdee-result-label {
    font-size: 1.1rem;
    color: var(--bulma-text);
    text-align: center;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tdee-result-help {
    color: var(--bulma-text-weak);
    text-align: center;
    font-size: 0.9rem;
}

.calorie-goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.calorie-goal-item {
    text-align: center;
    padding: 1rem;
    background: var(--bulma-background);
    border: 1px solid var(--bulma-border);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.calorie-goal-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .calorie-goal-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .calorie-goal-item:hover {
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}

.calorie-goal-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--bulma-primary);
    margin-bottom: 0.25rem;
}

.calorie-goal-label {
    font-size: 0.8rem;
    color: var(--bulma-text-weak);
    line-height: 1.2;
}

.tdee-info-card {
    background: var(--bulma-background);
    border: 1px solid var(--bulma-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .tdee-info-card {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
}

.tdee-info-card ul {
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.tdee-info-card li {
    margin-bottom: 0.5rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .health-container-padding {
        padding: 1rem;
    }

    .tdee-form-card,
    .tdee-results,
    .tdee-info-card {
        padding: 1rem;
    }

    .tdee-result-value {
        font-size: 2rem;
    }

    .calorie-goals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .calorie-goal-item {
        padding: 0.75rem;
    }

    .calorie-goal-value {
        font-size: 1.25rem;
    }
}

/* Form enhancements */
.field.has-addons .control:not(:last-child) .input,
.field.has-addons .control:not(:last-child) .select select {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.field.has-addons .control:not(:first-child) .input,
.field.has-addons .control:not(:first-child) .select select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.field.has-addons .control:not(:first-child) .select {
    margin-left: -1px;
}

/* Animation for results appearing */
.tdee-results {
    animation: fadeIn 0.5s ease-in-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error Message Styling */
.error-container {
    animation: slideInFromTop 0.3s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-container .notification {
    margin-bottom: 0;
}

.error-container .notification ul {
    margin-bottom: 0;
    margin-left: 1rem;
}

.error-container .notification li {
    margin-bottom: 0.25rem;
}

.error-container .notification li:last-child {
    margin-bottom: 0;
}

/* Field Error States */
.field-error .input,
.field-error .select select {
    border-color: #ff3860;
    box-shadow: 0 0 0 0.125em rgba(255, 56, 96, 0.25);
}

.field-error .input:focus,
.field-error .select select:focus {
    border-color: #ff3860;
    box-shadow: 0 0 0 0.125em rgba(255, 56, 96, 0.25);
}

.field-error .select:not(.is-multiple):not(.is-loading)::after {
    border-color: #ff3860;
}

/* Error message fade in animation */
.help.is-danger {
    animation: fadeInError 0.2s ease-out;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success states for validation */
.field-success .input,
.field-success .select select {
    border-color: #48c774;
    box-shadow: 0 0 0 0.125em rgba(72, 199, 116, 0.25);
}

.field-success .input:focus,
.field-success .select select:focus {
    border-color: #48c774;
    box-shadow: 0 0 0 0.125em rgba(72, 199, 116, 0.25);
}

.field-success .select:not(.is-multiple):not(.is-loading)::after {
    border-color: #48c774;
}

/* Dark mode improvements for error states */
[data-theme="dark"] .field-error .input,
[data-theme="dark"] .field-error .select select {
    border-color: #ff7a9a;
    box-shadow: 0 0 0 0.125em rgba(255, 122, 154, 0.25);
}

[data-theme="dark"] .field-success .input,
[data-theme="dark"] .field-success .select select {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 0.125em rgba(125, 211, 252, 0.25);
}

/* Dashboard Configuration Styles */
.dashboard-charts-container {
    min-height: 200px;
}

.chart-loading {
    padding: 2rem;
    text-align: center;
    color: var(--bulma-text-weak);
}

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

.chart-dropdown {
    position: relative;
}

.chart-dropdown .dropdown-trigger .button:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .chart-dropdown .dropdown-trigger .button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chart-dropdown .dropdown-menu {
    min-width: 12rem;
}

.chart-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chart-dropdown .dropdown-item:hover {
    background: var(--bulma-background);
}

.chart-dropdown .dropdown-item i {
    margin-right: 0.5rem;
}

/* Config Modal Styles */
.config-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.config-chart-item {
    border: 1px solid var(--bulma-border);
    border-radius: 8px;
    padding: 1rem;
    background: var(--bulma-background);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.config-chart-item:hover {
    border-color: var(--bulma-primary);
    background: var(--bulma-primary-light);
}

.config-chart-item.enabled {
    border-color: var(--bulma-success);
    background: var(--bulma-success-light);
}

.config-chart-item.disabled {
    opacity: 0.9;
    cursor: not-allowed;
}

.config-chart-item.disabled:hover {
    border-color: var(--bulma-border);
    background: var(--bulma-background);
}

.chart-disabled-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.chart-unavailable-notice {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 56, 96, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--bulma-danger);
}

.chart-warning-notice {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 221, 87, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--bulma-warning);
}

.config-chart-item .chart-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--bulma-primary);
}

.config-chart-item.enabled .chart-icon {
    color: var(--bulma-success);
}

.config-chart-item .chart-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.config-chart-item .chart-description {
    font-size: 0.85rem;
    color: var(--bulma-text-weak);
    margin-bottom: 0.5rem;
}

.config-chart-item .chart-toggle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.config-chart-item .chart-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.config-chart-item .size-select {
    flex: 1;
}

/* .config-chart-item .size-select select {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.25rem;
} */

.config-section {
    margin-bottom: 2rem;
}

.config-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--bulma-text);
    border-bottom: 1px solid var(--bulma-border);
    padding-bottom: 0.5rem;
}

.config-drag-handle {
    cursor: move;
    color: var(--bulma-text-weak);
    margin-right: 0.5rem;
}

.config-drag-handle:hover {
    color: var(--bulma-text);
}

.config-chart-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.config-chart-item.drag-over {
    border-color: var(--bulma-info);
    background: var(--bulma-info-light);
}

/* Responsive improvements for dashboard */
@media (max-width: 768px) {
    .dashboard-charts-container .columns {
        margin: 0 -0.5rem;
    }

    .dashboard-charts-container .column {
        padding: 0.5rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .chart-header .title {
        margin-bottom: 0;
    }

    .config-chart-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation for chart loading */
@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.health-card {
    animation: chartFadeIn 0.5s ease-in-out;
}

/* Empty state improvements */
/* .health-empty-state {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--bulma-text-weak);
}

.health-empty-state .health-icon-faded {
    opacity: 0.3;
    margin-bottom: 1rem;
}

.health-empty-state .health-text-spaced {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
} */

/* Dark mode improvements */
[data-theme="dark"] .config-chart-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .config-chart-item:hover {
    background: rgba(72, 199, 116, 0.15);
    border-color: #48c774;
}

[data-theme="dark"] .config-chart-item.enabled {
    background: rgba(72, 199, 116, 0.2);
    border-color: #48c774;
}

[data-theme="dark"] .config-chart-item.drag-over {
    background: rgba(62, 142, 208, 0.2);
    border-color: #3e8ed0;
}

[data-theme="dark"] .config-chart-item.disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .chart-unavailable-notice {
    background: rgba(255, 56, 96, 0.2);
}

[data-theme="dark"] .chart-warning-notice {
    background: rgba(255, 221, 87, 0.2);
}

/* Metrics Management Styles */
.metrics-table-container {
    overflow-x: auto;
}

.metrics-table {
    background: var(--bulma-background);
    border-radius: 8px;
    overflow: hidden;
}

.metrics-table th {
    background: var(--bulma-background);
    color: var(--bulma-text);
    font-weight: 600;
    border-bottom: 2px solid var(--bulma-border);
    padding: 1rem;
    white-space: nowrap;
}

.metrics-table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--bulma-border);
}

.metrics-table tr:hover {
    background: var(--bulma-background);
}

.metrics-table tr:last-child td {
    border-bottom: none;
}

.metrics-filters {
    background: var(--bulma-background);
    border: 1px solid var(--bulma-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.metrics-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.metrics-actions .button {
    white-space: nowrap;
}

.metric-type-tag {
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

.metric-value {
    font-weight: 600;
    color: var(--bulma-text);
}

.metric-unit {
    color: var(--bulma-text-weak);
    font-size: 0.9rem;
}

.metric-date {
    color: var(--bulma-text-weak);
    font-size: 0.9rem;
}

/* Dark mode improvements for metrics table */
[data-theme="dark"] .metrics-table {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .metrics-table th {
    background: rgba(255, 255, 255, 0.05);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .metrics-table td {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .metrics-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .metrics-filters {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Modal improvements for metrics */
.metrics-modal .modal-card {
    max-width: 500px;
}

.metrics-modal .modal-card-body {
    padding: 2rem;
}

.metrics-modal .notification {
    margin-bottom: 1rem;
}

.metrics-modal .field:last-child {
    margin-bottom: 0;
}

/* Delete confirmation modal styling */
.delete-confirmation {
    text-align: center;
    padding: 1rem;
}

.delete-confirmation .notification {
    background: var(--bulma-warning-light);
    border: 1px solid var(--bulma-warning);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.delete-confirmation .has-text-danger {
    font-weight: 600;
    margin-top: 1rem;
}

/* Responsive improvements for metrics table */
@media (max-width: 768px) {
    .metrics-table th,
    .metrics-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .metrics-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .metrics-actions .button {
        width: 100%;
        justify-content: flex-start;
    }
    
    .metrics-filters .columns {
        margin: 0;
    }
    
    .metrics-filters .column {
        padding: 0.25rem;
    }
    
    .metric-type-tag {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .metrics-table {
        font-size: 0.8rem;
    }
    
    .metrics-table th:nth-child(3),
    .metrics-table td:nth-child(3) {
        display: none; /* Hide unit column on very small screens */
    }
    
    .metrics-actions .button .icon {
        margin-right: 0;
    }
    
    .metrics-actions .button span:not(.icon) {
        display: none; /* Hide button text on very small screens */
    }
}

/* Loading and empty states */
.metrics-loading {
    text-align: center;
    padding: 3rem;
    color: var(--bulma-text-weak);
}

.metrics-empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--bulma-text-weak);
}

.metrics-empty-state .icon {
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Animation for table rows */
.metrics-table tbody tr {
    transition: background-color 0.2s ease;
}

.metrics-table tbody tr:hover {
    background: var(--bulma-primary-light);
}

[data-theme="dark"] .metrics-table tbody tr:hover {
    background: rgba(72, 199, 116, 0.1);
}

/* Button improvements */
.metrics-actions .button.is-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.metrics-actions .button.is-small .icon {
    width: 1rem;
    height: 1rem;
}

.metrics-actions .button.is-small .icon i {
    font-size: 0.75rem;
}

/* Chart Resize Modal Styles */
.chart-resize-modal .modal-card {
    max-width: 500px;
}

.chart-resize-modal .modal-card-body {
    padding: 2rem;
}

.chart-resize-modal .content p {
    /* margin-bottom: 1.5rem; */
    color: var(--bulma-text);
}

.chart-resize-modal .field {
    /* margin-bottom: 1.5rem; */
}

.chart-resize-modal .control {
    /* margin-bottom: 0.75rem; */
}

.chart-resize-modal .radio {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.chart-resize-modal .radio:hover {
    background: var(--bulma-background);
}

.chart-resize-modal .radio input[type="radio"] {
    margin-right: 0.75rem;
}

.chart-resize-modal .radio strong {
    color: var(--bulma-text);
}

.chart-resize-modal .notification {
    margin-top: 1rem;
    font-size: 0.875rem;
}

.chart-resize-modal .notification .icon {
    margin-right: 0.5rem;
}

/* Chart Configure Modal Styles */
.chart-configure-modal .modal-card {
    max-width: 600px;
}

.chart-configure-modal .modal-card-body {
    padding: 2rem;
}

.chart-configure-modal .content {
    margin-bottom: 1.5rem;
}

.chart-configure-modal .field {
    margin-bottom: 1.5rem;
}

.chart-configure-modal .field:last-child {
    margin-bottom: 0;
}

.chart-configure-modal .label {
    font-weight: 600;
    color: var(--bulma-text);
    margin-bottom: 0.5rem;
}

.chart-configure-modal .help {
    font-size: 0.875rem;
    color: var(--bulma-text-weak);
    margin-top: 0.25rem;
}

.chart-configure-modal .select {
    width: 100%;
}

.chart-configure-modal .select select {
    width: 100%;
}

.chart-configure-modal .checkbox {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.chart-configure-modal .checkbox:hover {
    background: var(--bulma-background);
}

.chart-configure-modal .checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
}

.chart-configure-modal .checkbox-group {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--bulma-border);
    border-radius: 4px;
    padding: 0.5rem;
}

.chart-configure-modal .checkbox-group .checkbox {
    margin-bottom: 0.25rem;
}

.chart-configure-modal .checkbox-group .checkbox:last-child {
    margin-bottom: 0;
}

.chart-configure-modal .notification {
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Dark mode improvements for chart modals */
[data-theme="dark"] .chart-resize-modal .radio:hover,
[data-theme="dark"] .chart-configure-modal .checkbox:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .chart-configure-modal .checkbox-group {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Modal transitions */
.chart-resize-modal .modal-card,
.chart-configure-modal .modal-card {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states for modals */
.chart-configure-modal .loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.chart-configure-modal .loading-content .icon {
    margin-bottom: 1rem;
    color: var(--bulma-text-weak);
}

.chart-configure-modal .loading-content p {
    color: var(--bulma-text-weak);
    margin-bottom: 0;
}

/* Form sections within configure modal */
.chart-configure-modal .form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--bulma-border);
}

.chart-configure-modal .form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.chart-configure-modal .form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bulma-text);
    margin-bottom: 1rem;
}

/* Responsive improvements for chart modals */
@media (max-width: 768px) {
    .chart-resize-modal .modal-card,
    .chart-configure-modal .modal-card {
        max-width: 95vw;
        margin: 1rem;
    }
    
    .chart-resize-modal .modal-card-body,
    .chart-configure-modal .modal-card-body {
        padding: 1.5rem;
    }
    
    .chart-resize-modal .radio,
    .chart-configure-modal .checkbox {
        padding: 0.5rem;
    }
    
    .chart-configure-modal .checkbox-group {
        max-height: 150px;
    }
}