/* CSS Variables for consistent theming */
:root {
    --color-primary: #8B4513;
    --color-secondary: #D2691E;
    --color-accent: #FF8C00;
    --color-warning: #FFA500;
    --color-success: #FFD700;
    
    --color-text: #333;
    --color-text-light: #666;
    --color-text-muted: #999;
    
    --color-bg: #fff;
    --color-bg-light: #f8f9fa;
    --color-bg-card: #ffffff;
    
    --color-border: #e0e0e0;
    --color-border-light: #f0f0f0;
    
    --color-error: #e74c3c;
    --color-info: #3498db;
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 16px;
    --font-size-small: 14px;
    --font-size-large: 18px;
    --font-size-xl: 24px;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-xl); }
h2 { font-size: var(--font-size-large); }
h3 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--spacing-md);
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.main {
    flex: 1;
    padding: var(--spacing-lg) 0;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: var(--spacing-lg) 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    flex-direction: column;
}
.black-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 30px;
background-color: #000000;
z-index: 1001;
}
.header__title {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: 32px;
    font-weight: 700;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.header__title img {
    height: 100px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.header__icon {
    font-size: 2rem;
}

.header__nav {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    text-decoration: none;
    display: inline-block;
    font-size: var(--font-size-small);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn:active {
    transform: scale(0.97);
}

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

.nav-btn--link {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Cards */
.card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--color-border-light);
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.card__title {
    color: var(--color-primary);
    margin-bottom: 0;
}

.card__description {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

.card__actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Buttons */
.btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    justify-content: center;
}

.btn:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn--secondary {
    background: var(--color-bg-light);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn--secondary:hover {
    background: var(--color-border-light);
}

.btn--small {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-small);
}

.btn--success {
    background: #28a745;
}

.btn--success:hover {
    background: #218838;
}

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

.btn--warning:hover {
    background: #e0a800;
}

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

.btn--danger:hover {
    background: #c82333;
}

/* Forms */
.config-form {
    max-width: 100%;
}

.care-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.care-item {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.care-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.care-item__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.care-item__icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.care-item__controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
}

.care-item__controls label {
    font-weight: 500;
    color: var(--color-text);
}

.care-item__controls input {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    transition: var(--transition);
    max-width: 150px;
}

.care-item__controls input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.help-text {
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* Checklist */
.checklist-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.summary-item {
    background: var(--color-bg-light);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.summary-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.summary-item__count {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.summary-item__label {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
}

.summary-item--overdue {
    border-color: var(--color-error);
}

.summary-item--overdue .summary-item__count {
    color: var(--color-error);
}

.summary-item--due {
    border-color: var(--color-warning);
}

.summary-item--due .summary-item__count {
    color: var(--color-warning);
}

.summary-item--upcoming {
    border-color: var(--color-success);
}

.summary-item--upcoming .summary-item__count {
    color: var(--color-success);
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checklist-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 2px var(--spacing-md);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
    min-height: 10px;
    height: auto;
}

.checklist-item:hover {
    box-shadow: var(--shadow-md);
    background: var(--color-bg-light);
}

.checklist-item--overdue {
    border-left: 4px solid var(--color-error);
    background: rgba(231, 76, 60, 0.05);
}

.checklist-item--due {
    border-left: 4px solid var(--color-warning);
    background: rgba(255, 165, 0, 0.05);
}

.checklist-item--upcoming {
    border-left: 4px solid var(--color-success);
    background: rgba(255, 215, 0, 0.05);
}

.checklist-item__icon {
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.checklist-item__title {
    flex: 1;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text);
    margin: 0;
    line-height: 1.2;
}

.checklist-item__checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    padding: 2px;
    border-radius: var(--border-radius);
    transition: background 0.2s ease;
    user-select: none;
    pointer-events: auto;
}

.checklist-item__checkbox-wrapper:hover {
    background: var(--color-bg-light);
}

.checklist-item__checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
  
    margin: 0;
    z-index: 10;
    top: 0;
    left: 0;
    pointer-events: auto;
}

.checklist-item__checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #28a745;
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.checklist-item__checkbox-custom .check-icon {
    color: white;
    font-size: 10px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.checklist-item__checkbox-input:checked ~ .checklist-item__checkbox-custom {
    background: #28a745;
    border-color: #28a745;
    animation: checkmarkPop 0.4s ease;
}

.checklist-item__checkbox-input:checked ~ .checklist-item__checkbox-custom .check-icon {
    opacity: 1;
    transform: scale(1);
}

.checklist-item__checkbox-wrapper:hover .checklist-item__checkbox-custom {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.checklist-item__checkbox-wrapper:active .checklist-item__checkbox-custom {
    transform: scale(0.95);
}


/* Checkbox para itens urgentes */
.checklist-item--overdue .checklist-item__checkbox-custom {
    border-color: #e74c3c;
}

.checklist-item--overdue .checklist-item__checkbox-input:checked ~ .checklist-item__checkbox-custom {
    background: #e74c3c;
    border-color: #e74c3c;
}

.checklist-item--overdue .checklist-item__checkbox-wrapper:hover .checklist-item__checkbox-custom {
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

@keyframes checkmark {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.checklist-item__icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.checklist-item__title {
    font-weight: 600;
    font-size: 16px;
    color: var(--color-text);
    margin: 0;
    text-align: center;
}

.checklist-item__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
}

.checklist-item__status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checklist-item__dates {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    font-size: 12px;
}

.checklist-item__date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.date-label {
    color: var(--color-text-muted);
    font-weight: 500;
}

.date-value {
    color: var(--color-text);
    font-weight: 500;
}

.checklist-item__time {
    color: var(--color-text);
    font-weight: 600;
}

.checklist-item__time.overdue-time {
    color: var(--color-error);
    font-weight: 700;
}

.checklist-item__footer {
    display: flex;
    justify-content: center;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border-light);
}

.status--overdue {
    background: #e74c3c;
    color: white;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.status--due {
    background: #f39c12;
    color: white;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.status--upcoming {
    background: #27ae60;
    color: white;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

@keyframes checkmarkPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-md);
    transition: var(--transition);
}

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

.stat-card__icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card__content h3 {
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-base);
}

.stat-card__value {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.stat-card__content small {
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
}

/* Chart */
.chart-container {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
}

.chart {
    height: 200px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.chart-bar {
    background: var(--color-primary);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    min-height: 10px;
    flex: 1;
    max-width: 40px;
    position: relative;
    transition: var(--transition);
}

.chart-bar:hover {
    background: var(--color-secondary);
}

.chart-bar__label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

.chart-bar__value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--font-size-small);
    font-weight: 500;
    color: var(--color-text);
}

/* Tab System */
.tab-content {
    display: block;
}

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

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
}

.loading__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.error {
    text-align: center;
    padding: var(--spacing-xl);
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--border-radius);
    margin: var(--spacing-lg) 0;
}

.error__icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.error__message {
    color: var(--color-error);
    margin-bottom: var(--spacing-lg);
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    max-width: 400px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification.hidden {
    display: none;
}

.notification--success {
    border-left: 4px solid #28a745;
}

.notification--error {
    border-left: 4px solid var(--color-error);
}

.notification--warning {
    border-left: 4px solid var(--color-warning);
}

.notification--info {
    border-left: 4px solid var(--color-info);
}

.notification__content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
}

.notification__icon {
    font-size: 1.2rem;
}

.notification__message {
    font-size: var(--font-size-small);
}

.notification__close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification__close:hover {
    color: var(--color-text);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
.footer {
    background: var(--color-primary);
    color: white;
    text-align: center;
    padding: var(--spacing-md) 0;
    margin-top: auto;
    padding-bottom: 80px;
    margin-bottom: 120px;
}

.footer p {
    margin: 0;
    font-size: var(--font-size-small);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 80px;
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    padding: 8px 16px;
    border-radius: 12px;
    min-width: 64px;
    min-height: 56px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bottom-nav__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 0 0 3px 3px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav__item:hover,
.bottom-nav__item:focus {
    color: var(--color-primary);
    background: rgba(139, 69, 19, 0.08);
    transform: translateY(-2px);
}

.bottom-nav__item:active {
    transform: translateY(0) scale(0.95);
    background: rgba(139, 69, 19, 0.15);
}

.bottom-nav__item.active {
    color: var(--color-primary);
}

.bottom-nav__item.active::before {
    transform: translateX(-50%) scaleX(1);
}

.bottom-nav__icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav__item.active .bottom-nav__icon-wrapper {
    transform: scale(1.1);
}

.bottom-nav__item:active .bottom-nav__icon-wrapper {
    transform: scale(0.9);
}

.bottom-nav__icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav__item.active .bottom-nav__icon {
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 4px rgba(139, 69, 19, 0.3));
}

.bottom-nav__label {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
}

.bottom-nav__item.active .bottom-nav__label {
    font-weight: 700;
    transform: scale(1.05);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Design */

/* Tablet - 2 colunas */
@media (max-width: 992px) {
    .care-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .checklist {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .header {
        padding: var(--spacing-md) 0;
    }
    
    .header__title {
        font-size: 24px;
        font-weight: 700;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
        flex-wrap: wrap;
        white-space: normal;
    }
    
    .header__title img {
        height: 75px;
        width: auto;
        max-width: 220px;
    }
    
    .header__nav {
        display: none;
    }
    
    .nav-btn {
        padding: var(--spacing-sm);
        font-size: var(--font-size-small);
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .care-items {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .care-item {
        padding: var(--spacing-sm);
    }
    
    .care-item__icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .care-item__header h3 {
        font-size: 13px;
    }
    
    .care-item__controls label {
        font-size: 12px;
    }
    
    .care-item__controls input {
        max-width: 80px;
        padding: 6px 8px;
        font-size: 14px;
    }
    
    .help-text {
        font-size: 10px;
    }
    
    .checklist {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .checklist-item {
        padding: 2px var(--spacing-md);
        min-height: 10px;
    }
    
    .checklist-item__icon {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .checklist-item__title {
        font-size: 11px;
    }
    
    .checklist-item__checkbox-custom {
        width: 16px;
        height: 16px;
    }
    
    .checklist-item__checkbox-custom .check-icon {
        font-size: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .stat-card {
        padding: var(--spacing-sm);
    }
    
    .stat-card__icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    
    .stat-card__content h3 {
        font-size: 12px;
    }
    
    .stat-card__value {
        font-size: 18px;
    }
    
    .stat-card__content small {
        font-size: 10px;
    }
    
    .checklist-summary {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .notification {
        left: var(--spacing-sm);
        right: var(--spacing-sm);
        max-width: none;
        top: 80px;
    }

    .main {
        padding-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .header__title {
        font-size: 20px;
        font-weight: 700;
        gap: var(--spacing-xs);
        flex-wrap: wrap;
        white-space: normal;
    }
    
    .header__title img {
        height:100px;
        width: auto;
        max-width: 180px;
    }
    
    .header__icon {
        font-size: 1.5rem;
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .care-item__controls input {
        max-width: 100%;
    }
    
    .checklist-item__info {
        width: 100%;
    }
    
    .chart {
        height: 150px;
    }

    .bottom-nav__label {
        font-size: 10px;
    }

    .bottom-nav__icon {
        width: 22px;
        height: 22px;
    }
}

/* Desktop: hide bottom nav, show header nav */
@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
    
    .footer {
        padding-bottom: var(--spacing-md);
    }
}

/* Print Styles */
@media print {
    .header__nav,
    .card__actions,
    .form-actions,
    .notification {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--color-border);
    }
    
    .checklist-item {
        break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000;
        --color-text: #000;
        --color-bg: #fff;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .checklist-item {
        border: 2px solid var(--color-border);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading__spinner {
        animation: none;
    }
}
