:root {
    --primary: #1E3A8A;
    --primary-light: #2563EB;
    --success: #059669;
    --success-light: #10B981;
    --danger: #DC2626;
    --danger-light: #EF4444;
    --warning: #D97706;
    --warning-light: #F59E0B;
    --bg: #F3F4F6;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--gray-900);
    line-height: 1.6;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
}

.logo i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

/* Navegação */
.desktop-nav, .mobile-nav {
    background: var(--white);
    padding: 0.75rem;
    display: flex;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.desktop-nav {
    display: flex;
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--gray-500);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.nav-btn i {
    font-size: 1.25rem;
}

.nav-btn:hover {
    background: var(--gray-100);
    color: var(--primary-light);
}

.nav-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tab-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Botões */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-accent {
    background: var(--success);
    color: var(--white);
}

.btn-accent:hover {
    background: var(--success-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--danger-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Cards e Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--gray-900);
}

.card-body {
    color: var(--gray-700);
    font-size: 0.875rem;
}

.card-body p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body i {
    width: 20px;
    color: var(--primary-light);
}

    .prescription-preview {
        padding: 1rem 0.5rem;
    }

    .prescription-preview-header {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        align-items: flex-start;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--gray-200);
        padding-bottom: 1rem;
    }

    .prescription-preview-title {
        font-size: 1.4rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        margin: 0;
        color: var(--gray-900);
    }

    .prescription-preview-description {
        margin: 0.5rem 0 0;
        color: var(--gray-600);
        max-width: 520px;
        line-height: 1.5;
    }

    .prescription-summary {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
        margin: 1rem 0 1.5rem;
    }

    .prescription-summary-card {
        display: flex;
        gap: 0.75rem;
        align-items: center;
        background: var(--gray-50);
        border-radius: var(--radius);
        padding: 0.9rem 1rem;
        border: 1px solid var(--gray-200);
    }

    .prescription-summary-card i {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background: rgba(37, 99, 235, 0.12);
        color: var(--primary);
        font-size: 1rem;
    }

    .prescription-summary-label {
        display: block;
        font-size: 0.75rem;
        color: var(--gray-500);
        margin-bottom: 0.2rem;
    }

    .prescription-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
    }

    .prescription-card {
        background: var(--white);
        border-radius: var(--radius-lg);
        border: 1px solid var(--gray-200);
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    }

    .prescription-card-header {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .prescription-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background: rgba(37, 99, 235, 0.12);
        color: var(--primary);
        font-size: 1rem;
    }

    .prescription-card-title {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
        color: var(--gray-900);
        line-height: 1.2;
    }

    .prescription-card-subtitle {
        margin: 0.3rem 0 0;
        color: var(--gray-600);
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .prescription-card-body p {
        margin: 0.5rem 0;
        color: var(--gray-700);
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .prescription-card-body i {
        width: 18px;
        color: var(--primary-light);
    }

    .prescription-card-badge {
        margin-left: auto;
    }

    .prescription-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: flex-end;
        margin-top: 1.5rem;
    }

    .prescription-alert {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        background: #FEF3C7;
        border: 1px solid #FDE68A;
        color: #92400E;
        padding: 1rem;
        border-radius: var(--radius);
        margin-bottom: 1rem;
    }

    .prescription-summary-badge {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

.form-error {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.form-control.error {
    border-color: var(--danger);
}

.form-control.error + .form-error {
    display: block;
}

/* Modals Customizados */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Camera View */
.camera-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.camera-container video,
.camera-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.capture-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.capture-btn:hover {
    transform: scale(1.1);
}

.capture-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--primary-light);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--success);
    animation: slideIn 0.3s ease;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#reminder-banner {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: 420px;
    margin: 0 auto;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.18);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    z-index: 2100;
}

#reminder-banner.visible,
#reminder-banner:not(.hidden) {
    display: flex;
}

.hidden {
    display: none !important;
}

#reminder-banner-message {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

#reminder-banner button {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: white;
    padding: 0.55rem 0.85rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

#reminder-banner button:hover {
    background: rgba(255, 255, 255, 0.28);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .main-content {
        padding: 1rem;
        padding-bottom: 5rem;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-header {
        flex-direction: column;
    }
    
    .tab-header h2 {
        font-size: 1.25rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-container {
        width: 95%;
        max-height: 85vh;
    }
}

/* Estilo para items dinâmicos */
.dynamic-items {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.dynamic-item {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    position: relative;
}

.remove-item {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* ============================================
   SISTEMA DE CONTROLE DE TRATAMENTO
   Design simples e acessível (15-80 anos)
   ============================================ */

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.dashboard-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-date {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Próxima Dose Card */
.proxima-dose-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.3);
    animation: pulseSuave 2s infinite;
}

@keyframes pulseSuave {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

.proxima-dose-card.atrasada {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
    animation: pulseAlerta 1s infinite;
}

.proxima-dose-card.agora {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-light) 100%);
}

@keyframes pulseAlerta {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3); }
    50% { transform: scale(1.02); box-shadow: 0 12px 32px rgba(220, 38, 38, 0.5); }
}

.proxima-dose-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.proxima-dose-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.proxima-dose-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.proxima-dose-medicamento {
    font-size: 1.5rem;
    font-weight: 700;
}

.proxima-dose-horario {
    font-size: 2rem;
    font-weight: 700;
}

.proxima-dose-tempo {
    font-size: 1rem;
    opacity: 0.9;
}

.proxima-dose-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Botões de Dose - Grandes e acessíveis */
.btn-dose {
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    min-height: 48px;
}

.btn-confirmar {
    background: var(--success);
    color: white;
}

.btn-confirmar:hover {
    background: var(--success-light);
    transform: translateY(-2px);
}

.btn-adiar {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-adiar:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Dose Sections */
.dose-section {
    margin-bottom: 1.5rem;
}

.dose-section h3 {
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dose-section-atrasadas h3 {
    color: var(--danger);
}

/* Dose Grid */
.dose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

/* Dose Card */
.dose-card {
    background: white;
    border-radius: var(--radius);
    padding: 1rem;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dose-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.dose-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.dose-card-horario {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.dose-card-status {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dose-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dose-card-medicamento {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.95rem;
}

.dose-card-dosagem {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Status Colors */
.status-tomado {
    border-left: 4px solid var(--success);
}

.status-tomado .dose-card-status {
    color: var(--success);
}

.status-adiado {
    border-left: 4px solid var(--warning);
}

.status-adiado .dose-card-status {
    color: var(--warning);
}

.status-perdido {
    border-left: 4px solid var(--danger);
    background: #FEF2F2;
}

.status-perdido .dose-card-status {
    color: var(--danger);
}

.status-pendente {
    border-left: 4px solid var(--gray-400);
}

.status-pendente .dose-card-status {
    color: var(--gray-500);
}

.status-pendente:hover {
    border-left-color: var(--primary);
}

/* Dose Banner (notificação flutuante) */
#dose-banner {
    position: fixed;
    bottom: 80px;
    right: 1rem;
    left: 1rem;
    max-width: 420px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 12px 40px rgba(30, 58, 138, 0.4);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    z-index: 2100;
    text-align: center;
    display: none;
}

#dose-banner.visible {
    display: block;
    animation: slideUp 0.3s ease;
}

/* Dose Modal */
.dose-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.dose-modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    animation: bounceIn 0.4s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.dose-modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.dose-modal-header i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.dose-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.dose-modal-body {
    padding: 1.5rem;
    text-align: center;
}

.dose-horario {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.dose-paciente {
    color: var(--gray-600);
    font-size: 1rem;
    margin: 0;
}

.dose-dosagem {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.dose-modal-actions {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-dose-large {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    min-height: 56px;
}

.btn-dose-large i {
    font-size: 1.5rem;
}

.btn-confirmar-large {
    background: var(--success);
    color: white;
}

.btn-confirmar-large:hover {
    background: var(--success-light);
    transform: translateY(-2px);
}

.btn-adiar-large {
    background: var(--warning);
    color: white;
}

.btn-adiar-large:hover {
    background: var(--warning-light);
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 0.5rem;
}

.empty-state small {
    font-size: 0.9rem;
    color: var(--gray-400);
}

/* Responsividade para Dashboard */
@media (max-width: 768px) {
    .proxima-dose-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .proxima-dose-info {
        align-items: center;
    }

    .proxima-dose-medicamento {
        font-size: 1.25rem;
    }

    .proxima-dose-horario {
        font-size: 1.75rem;
    }

    .proxima-dose-actions {
        flex-direction: row;
        width: 100%;
    }

    .btn-dose {
        flex: 1;
    }

    .dose-grid {
        grid-template-columns: 1fr 1fr;
    }

    #dose-banner {
        bottom: 70px;
        left: 0.5rem;
        right: 0.5rem;
        max-width: none;
    }

    .dose-modal {
        width: 95%;
        margin: 1rem auto;
    }
}

/* ============================================
   RECEITA - MODAL BONITO E SIMPLES
   ============================================ */

.recipe-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 9999;
}

@media (min-width: 600px) {
    .recipe-overlay {
        align-items: center;
    }
}

.recipe-card {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: 24px 24px 0 0;
    max-height: 95vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 600px) {
    .recipe-card {
        border-radius: 24px;
        max-height: 90vh;
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Header */
.recipe-header {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: white;
    padding: 1.5rem;
    border-radius: 24px 24px 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.recipe-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.recipe-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.recipe-header-close {
    margin-left: auto;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-header-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Body */
.recipe-body {
    padding: 1.5rem;
}

/* Progress */
.recipe-progress {
    text-align: center;
    margin-bottom: 1.5rem;
}

.recipe-progress-text {
    font-size: 0.9rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
}

.recipe-progress-text strong {
    color: #2563EB;
    font-size: 1.5rem;
}

.recipe-progress-bar {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}

.recipe-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Medication Card */
.recipe-med-card {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.recipe-med-card.active {
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.recipe-med-card.done {
    border-color: #10B981;
    background: #F0FDF4;
}

.recipe-med-card.skip {
    border-color: #E5E7EB;
    opacity: 0.5;
}

.recipe-med-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.recipe-med-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.recipe-med-dose {
    font-size: 0.9rem;
    color: #6B7280;
    margin: 0.25rem 0 0;
}

.recipe-med-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.recipe-med-badge.active {
    background: #DBEAFE;
    color: #1D4ED8;
}

.recipe-med-badge.done {
    background: #D1FAE5;
    color: #065F46;
}

.recipe-med-badge.skip {
    background: #F3F4F6;
    color: #6B7280;
}

.recipe-med-times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.recipe-time-chip {
    background: #DBEAFE;
    color: #1D4ED8;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.recipe-time-chip.done {
    background: #D1FAE5;
    color: #065F46;
}

.recipe-time-chip.skip {
    background: #F3F4F6;
    color: #9CA3AF;
    text-decoration: line-through;
}

.recipe-med-info {
    font-size: 0.85rem;
    color: #6B7280;
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.recipe-med-info span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Actions */
.recipe-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #F3F4F6;
}

.recipe-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.recipe-btn-confirm {
    background: #10B981;
    color: white;
}

.recipe-btn-confirm:hover {
    background: #059669;
    transform: translateY(-1px);
}

.recipe-btn-edit {
    background: #F3F4F6;
    color: #374151;
}

.recipe-btn-edit:hover {
    background: #E5E7EB;
}

.recipe-btn-skip {
    background: transparent;
    color: #9CA3AF;
    border: 1px solid #E5E7EB;
}

.recipe-btn-skip:hover {
    background: #F3F4F6;
    color: #6B7280;
}

/* Full Width Button */
.recipe-btn-full {
    width: 100%;
    padding: 1rem;
    background: #10B981;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.recipe-btn-full:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.recipe-btn-full:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.recipe-btn-full.secondary {
    background: #F3F4F6;
    color: #374151;
}

.recipe-btn-full.secondary:hover {
    background: #E5E7EB;
}

/* Patient Section */
.recipe-patient {
    margin: 1.5rem 0;
}

.recipe-patient label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.recipe-patient-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.recipe-patient-select:focus {
    outline: none;
    border-color: #2563EB;
}

.recipe-patient-new {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.recipe-patient-new input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 0.9rem;
}

.recipe-patient-new input:focus {
    outline: none;
    border-color: #2563EB;
}

.recipe-patient-new button {
    padding: 0.75rem 1rem;
    background: #2563EB;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* Summary */
.recipe-summary {
    background: #F9FAFB;
    border-radius: 16px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.recipe-summary h4 {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recipe-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recipe-summary-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6B7280;
}

.recipe-summary-list li i.fa-check {
    color: #10B981;
}

.recipe-summary-list li i.fa-times {
    color: #9CA3AF;
}

.recipe-summary-list li i.fa-forward {
    color: #F59E0B;
}

/* Edit Modal */
.recipe-edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.recipe-edit-modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    padding: 1.5rem;
}

.recipe-edit-modal h4 {
    margin: 0 0 1rem;
    color: #111827;
}

.recipe-edit-times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.recipe-edit-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recipe-edit-time input {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    text-align: center;
}

.recipe-edit-time button {
    width: 28px;
    height: 28px;
    background: #FEE2E2;
    color: #DC2626;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-edit-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.recipe-edit-actions button {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.recipe-edit-actions .cancel {
    background: #F3F4F6;
    color: #374151;
    border: none;
}

.recipe-edit-actions .save {
    background: #10B981;
    color: white;
    border: none;
}

/* =====================================================================
   v12 — Design system "MediCare Calmo"
   Paleta de saúde, tipografia generosa, botões grandes (15-80 anos),
   modo escuro automático e componentes do configurador de avisos.
   ===================================================================== */

:root {
    /* Paleta verde — saúde, natureza, vitalidade */
    --mc-primary: #059669;          /* emerald-600 */
    --mc-primary-strong: #047857;   /* emerald-700 */
    --mc-primary-deep: #065F46;     /* emerald-800 */
    --mc-primary-soft: #D1FAE5;     /* emerald-100 */
    --mc-accent: #14B8A6;           /* teal-500 (verde-azulado suave) */
    --mc-accent-soft: #CCFBF1;      /* teal-100 */
    --mc-success: #16A34A;          /* green-600 */
    --mc-success-soft: #DCFCE7;     /* green-100 */
    --mc-warning: #F59E0B;
    --mc-warning-soft: #FEF3C7;
    --mc-danger: #EF4444;
    --mc-danger-soft: #FEE2E2;
    --mc-bg: #F0FDF4;               /* fundo verde-clarinho (green-50) */
    --mc-card: #FFFFFF;
    --mc-text: #052E16;             /* verde-escuro p/ texto (green-950) */
    --mc-text-soft: #4B5563;
    --mc-border: #D1FAE5;
    --mc-radius: 16px;
    --mc-radius-lg: 24px;
    --mc-shadow: 0 4px 12px rgba(5, 150, 105, .08);
    --mc-shadow-lg: 0 12px 32px rgba(5, 150, 105, .15);
}

/* Dark mode automático desativado — uso da paleta verde clara é mais legível
   para o público de 15-80 anos. Para reativar, restaure o bloco @media abaixo. */

body {
    background: var(--mc-bg);
    color: var(--mc-text);
    font-size: 17px;
    line-height: 1.55;
}

.app-header {
    background: linear-gradient(135deg, var(--mc-primary-strong), var(--mc-primary));
    color: #fff;
}

.btn,
.btn-lg {
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: .01em;
    min-height: 48px;
    padding: 0 22px;
    transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: 0 28px; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--mc-shadow); }
.btn-primary { background: linear-gradient(135deg, var(--mc-primary), var(--mc-primary-strong)); color: #fff; border: none; }
.btn-accent  { background: linear-gradient(135deg, #3B82F6, var(--mc-primary)); color: #fff; border: none; }
.btn-danger  { background: var(--mc-danger); color: #fff; border: none; }
.btn-secondary { background: var(--mc-primary-soft); color: var(--mc-primary-strong); border: none; }

.card {
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow);
    border: 1px solid var(--mc-border);
    padding: 1.25rem;
    transition: box-shadow .2s ease, transform .12s ease;
}
.card:hover { box-shadow: var(--mc-shadow-lg); transform: translateY(-2px); }
.card-title { font-weight: 700; font-size: 1.15rem; color: var(--mc-text); }
.card-body p { color: var(--mc-text-soft); margin: .25rem 0; }

.badge { border-radius: 999px; padding: .25rem .75rem; font-weight: 600; font-size: .8rem; }
.badge-success { background: var(--mc-success-soft); color: var(--mc-success); }
.badge-warning { background: var(--mc-warning-soft); color: var(--mc-warning); }
.badge-danger  { background: var(--mc-danger-soft); color: var(--mc-danger); }

.tab-content { padding: 1.5rem; }
.tab-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tab-header h2 { font-size: 1.6rem; font-weight: 700; }

.modal-overlay { backdrop-filter: blur(4px); background: rgba(15, 23, 42, .55); }
.modal-container { border-radius: var(--mc-radius-lg); box-shadow: var(--mc-shadow-lg); background: var(--mc-card); color: var(--mc-text); }
.modal-header { border-bottom: 1px solid var(--mc-border); padding: 1.25rem 1.5rem; }
.modal-header h3 { font-size: 1.3rem; font-weight: 700; }
.form-control { border: 2px solid var(--mc-border); border-radius: 12px; padding: .8rem 1rem; font-size: 1rem; background: var(--mc-card); color: var(--mc-text); transition: border-color .15s, box-shadow .15s; }
.form-control:focus { outline: none; border-color: var(--mc-primary); box-shadow: 0 0 0 3px var(--mc-primary-soft); }

/* Próxima dose — card gigante centralizado */
.proxima-dose-card {
    background: linear-gradient(135deg, var(--mc-primary), var(--mc-primary-strong));
    color: #fff;
    border-radius: var(--mc-radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--mc-shadow-lg);
    margin-bottom: 2rem;
}
.proxima-dose-card .proxima-dose-icon { font-size: 2.5rem; margin-bottom: .5rem; opacity: .9; }
.proxima-dose-card .proxima-dose-label { display: block; opacity: .85; letter-spacing: .12em; font-size: .8rem; }
.proxima-dose-card .proxima-dose-medicamento { display: block; font-size: 2rem; font-weight: 800; margin-top: .25rem; }
.proxima-dose-card .proxima-dose-horario { display: block; font-size: 3rem; font-weight: 800; margin: .5rem 0; }
.proxima-dose-card .proxima-dose-tempo { display: block; font-size: 1.1rem; opacity: .9; margin-bottom: 1.5rem; }
.proxima-dose-card.atrasada { background: linear-gradient(135deg, #DC2626, #991B1B); }
.proxima-dose-card.agora { background: linear-gradient(135deg, var(--mc-warning), #D97706); animation: pulseSoft 1.6s ease-in-out infinite; }
.proxima-dose-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.btn-dose { min-height: 56px; min-width: 150px; font-size: 1.1rem; font-weight: 700; border-radius: 14px; border: none; padding: 0 1.5rem; cursor: pointer; transition: transform .1s; }
.btn-dose:hover { transform: scale(1.04); }
.btn-confirmar { background: var(--mc-success); color: #fff; }
.btn-adiar { background: var(--mc-warning); color: #fff; }

/* Cards de doses */
.dose-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.dose-card {
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    border: 1px solid var(--mc-border);
    border-left: 6px solid var(--mc-text-soft);
    padding: 1rem 1.25rem;
    transition: transform .12s ease, box-shadow .12s ease;
}
.dose-card:hover { transform: translateY(-2px); box-shadow: var(--mc-shadow); }
.dose-card.status-pendente { border-left-color: var(--mc-warning); }
.dose-card.status-tomado   { border-left-color: var(--mc-success); }
.dose-card.status-adiado   { border-left-color: var(--mc-primary); }
.dose-card.status-perdido  { border-left-color: var(--mc-danger); }
.dose-card-header { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: .5rem; }
.dose-card-horario { font-size: 1.4rem; font-weight: 800; }
.dose-card-medicamento { display: block; font-weight: 600; }
.dose-card-dosagem { display: block; color: var(--mc-text-soft); font-size: .9rem; }

.dose-section { margin-bottom: 2rem; }
.dose-section h3 { font-size: 1.1rem; margin-bottom: .75rem; color: var(--mc-text-soft); font-weight: 600; }

@keyframes pulseSoft { 0%,100% { transform: scale(1); } 50% { transform: scale(1.02); } }

/* Banner de dose */
.dose-banner {
    position: sticky; top: 0; z-index: 50;
    background: linear-gradient(135deg, var(--mc-warning), #D97706);
    color: #fff; text-align: center;
    padding: 1rem; border-radius: var(--mc-radius);
    margin: 0 0 1.5rem; font-weight: 600;
    box-shadow: var(--mc-shadow-lg);
}
.dose-banner.hidden { display: none; }

/* Configurador de avisos */
#tab-config { padding: 1.5rem; }
.config-card {
    background: var(--mc-card);
    border-radius: var(--mc-radius-lg);
    box-shadow: var(--mc-shadow);
    border: 1px solid var(--mc-border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 720px;
}
.config-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.config-card h4 { font-size: 1rem; font-weight: 700; margin: 1.5rem 0 .5rem; color: var(--mc-text-soft); text-transform: uppercase; letter-spacing: .08em; }
.config-label { display: block; font-weight: 600; margin: .5rem 0 .25rem; color: var(--mc-text-soft); }
.config-help { color: var(--mc-text-soft); font-size: .9rem; margin-bottom: 1rem; }
.config-form-hidden { display: none; }
#cfg-paciente-form:not(.config-form-hidden) { margin-top: 1.25rem; display: block; }

.switch-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 0; border-top: 1px solid var(--mc-border);
}
.switch-row:first-of-type { border-top: none; }
.switch-label { font-size: 1.05rem; font-weight: 500; display: flex; align-items: center; gap: .75rem; }
.switch-label i { color: var(--mc-primary); width: 24px; text-align: center; }

.switch { position: relative; display: inline-block; width: 60px; height: 34px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--mc-border); transition: .25s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 26px; width: 26px;
    left: 4px; bottom: 4px; background: #fff; transition: .25s; border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--mc-success); }
.switch input:checked + .slider:before { transform: translateX(26px); }

.campo-extra { padding: 0 0 1rem; margin-top: -.25rem; }
.campo-extra .form-control { width: 100%; }

.config-actions {
    display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem;
    border-top: 1px solid var(--mc-border); padding-top: 1.25rem;
}

/* Empty states */
.empty-state {
    text-align: center; padding: 3rem 1.5rem;
    background: var(--mc-card);
    border-radius: var(--mc-radius-lg);
    border: 2px dashed var(--mc-border);
    color: var(--mc-text-soft);
}
.empty-state i { font-size: 3rem; color: var(--mc-primary); opacity: .5; margin-bottom: 1rem; }
.empty-state p { font-size: 1.15rem; font-weight: 600; color: var(--mc-text); }

/* Acessibilidade */
button:focus-visible, .form-control:focus-visible, .nav-btn:focus-visible {
    outline: 3px solid var(--mc-primary);
    outline-offset: 2px;
}

/* Garantir contraste — força texto escuro em todos containers claros */
.card, .card *,
.modal-container, .modal-container *,
.config-card, .config-card *,
.tab-content, .tab-content *,
.dose-card, .dose-card *,
.empty-state, .empty-state * {
    color: var(--mc-text);
}

/* Texto suave continua nos lugares certos */
.card-body p, .card-body p *,
.dose-card-dosagem,
.config-help, .config-label,
.dose-section h3,
.empty-state small,
.modal-body small {
    color: var(--mc-text-soft) !important;
}

/* Inputs e textareas — garantir fundo claro com texto escuro */
.form-control, input.form-control, textarea.form-control, select.form-control {
    background: #FFFFFF !important;
    color: var(--mc-text) !important;
    border: 2px solid var(--mc-border);
}
.form-control::placeholder { color: #9CA3AF !important; }

label, .form-group label {
    color: var(--mc-text) !important;
    font-weight: 600;
}

/* Botões com fundo colorido mantêm texto branco */
.btn-primary, .btn-primary *,
.btn-accent, .btn-accent *,
.btn-danger, .btn-danger *,
.btn-confirmar, .btn-confirmar *,
.btn-adiar, .btn-adiar *,
.btn-dose, .btn-dose *,
.proxima-dose-card, .proxima-dose-card *,
.app-header, .app-header *,
.dose-banner, .dose-banner *,
.badge, .badge * {
    color: #FFFFFF !important;
}

.btn-secondary, .btn-secondary * {
    color: var(--mc-primary-deep) !important;
}

/* Forçar light theme em qualquer elemento solto — evita branco-no-branco */
html, body {
    background: var(--mc-bg) !important;
    color: var(--mc-text) !important;
    color-scheme: light;
}
* { color-scheme: light; }

/* Qualquer container claro herda texto escuro */
div, p, span, li, td, th, h1, h2, h3, h4, h5, h6 {
    color: inherit;
}

/* Mensagens de aviso/erro do PHP que escapam do template — deixa visível */
b, strong, font[color] { color: #B91C1C !important; }

/* Mobile bottom nav refinado */
.mobile-nav {
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    background: var(--mc-card);
    border-top: 1px solid var(--mc-border);
}
.mobile-nav .nav-btn {
    min-height: 64px;
    color: var(--mc-text-soft);
}
.mobile-nav .nav-btn.active {
    color: var(--mc-primary);
    background: var(--mc-primary-soft);
    border-radius: 16px;
    margin: 4px;
}
.mobile-nav .nav-btn i { font-size: 1.4rem; }
