﻿/**
 * css/pages/meu_paciente.css
 * Extraido de meu_paciente.php (Sprint 3 - 2026-05-10).
 * Auto-gerado: NAO editar manualmente sem checar o PHP correspondente.
 */

/* === [meu_paciente.php] bloco 1 (linha original ~718) === */
:root {
            --primary-light: #2d4a6f;
            --primary-lighter: #e8f4fc;
            --accent: #5FB6C4;
            --accent-light: #E6F4F6;
            --bg: #f8fafc;
            --bg-white: #ffffff;
            --card: #ffffff;
            --text: #1e293b;
            --text-secondary: #475569;
            --text-muted: #94a3b8;
            --border: #e2e8f0;
            --danger: #ef4444;
            --warning: #f59e0b;
            --info: #334155;
            --safe-top: env(safe-area-inset-top, 0px);
            --safe-bottom: env(safe-area-inset-bottom, 0px);
            --nav-height: 65px;
        }
        
        * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
        
        html, body {
            height: 100%;
            overflow: hidden;
        }
        
        body {
            font-family: 'Inter', -apple-system, sans-serif;
            background: var(--bg);
            color: var(--text);
            -webkit-font-smoothing: antialiased;
        }
        
        body.logged-in {
            overflow-y: auto;
            padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
        }

        /* ================================================
           LOGIN - FIXO E CENTRALIZADO
           ================================================ */
        .login-page {
            position: fixed;
            inset: 0;
            display: flex;
            flex-direction: column;
            background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
            overflow: hidden;
        }
        
        .login-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px;
            padding-top: calc(20px + var(--safe-top));
            padding-bottom: calc(20px + var(--safe-bottom));
            overflow: hidden;
        }
        
        .login-box {
            width: 100%;
            max-width: 360px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        
        .login-logo {
            max-width: 140px;
            max-height: 70px;
            width: auto;
            height: auto;
            object-fit: contain;
            margin-bottom: 24px;
        }
        
        .login-card {
            background: var(--bg-white);
            border-radius: 20px;
            padding: 28px 24px;
            width: 100%;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }
        
        .login-title {
            font-size: 22px;
            font-weight: 700;
            color: var(--text);
            text-align: center;
            margin-bottom: 4px;
        }
        
        .login-subtitle {
            font-size: 13px;
            color: var(--text-muted);
            text-align: center;
            margin-bottom: 24px;
        }
        
        .form-group { margin-bottom: 16px; }
        
        .form-group label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 6px;
        }
        
        .input-wrapper {
            position: relative;
        }
        
        .input-wrapper i {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 16px;
        }
        
        .input-wrapper input {
            width: 100%;
            padding: 14px 14px 14px 44px;
            background: var(--bg);
            border: 2px solid var(--border);
            border-radius: 12px;
            font-size: 15px;
            font-family: inherit;
            color: var(--text);
            transition: all 0.2s;
        }
        
        .input-wrapper input:focus {
            outline: none;
            border-color: var(--primary);
            background: var(--bg-white);
        }
        
        .btn-login {
            width: 100%;
            padding: 14px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 8px;
        }
        
        .error-msg {
            background: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #dc2626;
            font-size: 13px;
        }
        
        .login-footer {
            margin-top: 20px;
            text-align: center;
        }
        
        .login-footer p {
            color: rgba(255,255,255,0.7);
            font-size: 12px;
            margin-bottom: 10px;
        }
        
        .btn-whatsapp-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            background: rgba(255,255,255,0.15);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 50px;
            color: white;
            font-size: 13px;
            text-decoration: none;
        }
        
        .btn-whatsapp-link i { color: #25d366; }
        
        /* Responsivo Login - Telas muito pequenas */
        @media (max-height: 580px) {
            .login-logo { max-width: 100px; max-height: 50px; margin-bottom: 16px; }
            .login-card { padding: 20px 18px; }
            .login-title { font-size: 20px; }
            .login-subtitle { margin-bottom: 16px; font-size: 12px; }
            .form-group { margin-bottom: 12px; }
            .input-wrapper input { padding: 12px 12px 12px 40px; font-size: 14px; }
            .btn-login { padding: 12px; }
            .login-footer { margin-top: 12px; }
            .login-footer p { margin-bottom: 6px; }
        }
        
        @media (max-height: 500px) {
            .login-logo { max-width: 80px; max-height: 40px; margin-bottom: 12px; }
            .login-card { padding: 16px; border-radius: 16px; }
            .login-subtitle { display: none; }
        }

        /* ================================================
           APP - ÁREA LOGADA
           ================================================ */
        .app-wrapper {
            min-height: 100%;
            background: var(--bg);
        }
        
        .app-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
            background: var(--primary);
            color: white;
            padding: 14px 16px;
            padding-top: calc(14px + var(--safe-top));
        }
        
        .header-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
            max-width: 600px;
            margin: 0 auto;
        }
        
        .header-user {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .user-avatar {
            width: 42px;
            height: 42px;
            background: rgba(255,255,255,0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            font-weight: 700;
            overflow: hidden;
        }
        
        .user-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .user-info h2 {
            font-size: 15px;
            font-weight: 600;
        }
        
        .user-info span {
            font-size: 11px;
            opacity: 0.8;
        }
        
        .header-actions { display: flex; gap: 6px; }
        
        .header-btn {
            width: 38px;
            height: 38px;
            background: rgba(255,255,255,0.15);
            border: none;
            border-radius: 10px;
            color: white;
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            position: relative;
        }
        
        .header-btn .badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: var(--danger);
            color: white;
            font-size: 10px;
            font-weight: 700;
            min-width: 18px;
            height: 18px;
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .main-content {
            padding-top: calc(80px + var(--safe-top));
            padding-bottom: 20px;
            padding-left: 16px;
            padding-right: 16px;
            max-width: 600px;
            margin: 0 auto;
        }
        
        .app-section { display: none; animation: fadeIn 0.3s ease; }
        .app-section.active { display: block; }

/* Banner Formulário Semanal */
        .form-semanal-banner {
            background: linear-gradient(135deg, var(--brand-primary-dark) 0%, #1e293b 100%);
            border-radius: 16px;
            padding: 16px;
            margin-bottom: 16px;
            color: white;
            display: flex;
            align-items: center;
            gap: 14px;
            text-decoration: none;
            box-shadow: 0 4px 15px rgba(96, 145, 101, 0.3);
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.02); }
        }
        
        .form-semanal-banner:active {
            transform: scale(0.98);
        }
        
        .form-semanal-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: 22px;
            flex-shrink: 0;
        }
        
        .form-semanal-text h4 {
            font-size: 14px;
            font-weight: 700;
            margin-bottom: 2px;
        }
        
        .form-semanal-text p {
            font-size: 12px;
            opacity: 0.9;
        }
        
        .form-semanal-arrow {
            margin-left: auto;
            font-size: 18px;
            opacity: 0.8;
        }
        
        /* Cards */
        .card {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 16px;
            margin-bottom: 16px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }
        
        .card-header {
            padding: 14px 16px;
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: var(--bg);
        }
        
        .card-header h3 {
            font-size: 14px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .card-header h3 i { color: var(--primary); }
        .card-body { padding: 16px; }
        
        /* Próximo Agendamento */
        .next-appointment {
            background: linear-gradient(135deg, var(--accent) 0%, var(--brand-primary-dark) 100%);
            border-radius: 16px;
            padding: 18px;
            margin-bottom: 16px;
            color: white;
            box-shadow: 0 4px 15px rgba(134, 201, 140, 0.3);
        }
        
        .next-appointment .label {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 1px;
            opacity: 0.9;
        }
        
        .next-appointment .date {
            font-size: 18px;
            font-weight: 700;
            margin: 4px 0;
        }
        
        .next-appointment .time {
            font-size: 13px;
            opacity: 0.9;
        }
        
        .next-appointment .actions {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }
        
        .next-appointment .btn-action {
            flex: 1;
            padding: 10px;
            border-radius: 10px;
            border: none;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        
        .btn-confirm { background: white; color: var(--accent); }
        .btn-cancel { background: rgba(255,255,255,0.2); color: white; }
        
        .status-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .status-badge.confirmado { background: var(--accent-light); color: var(--accent); }
        .status-badge.agendado { background: #fef3c7; color: #d97706; }
        
        /* Stats */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }
        
        .stat-card {
            background: var(--bg);
            border-radius: 12px;
            padding: 14px;
            text-align: center;
        }
        
        .stat-card .icon {
            width: 36px;
            height: 36px;
            background: var(--primary-lighter);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 8px;
            color: var(--primary);
            font-size: 16px;
        }
        
        .stat-card .value {
            font-size: 22px;
            font-weight: 700;
            color: var(--text);
        }
        
        .stat-card .label {
            font-size: 10px;
            color: var(--text-muted);
            text-transform: uppercase;
        }
        
        /* Plano */
        .plano-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 16px;
            background: var(--accent-light);
        }
        
        .plano-info h4 { font-size: 14px; font-weight: 600; }
        .plano-info span { font-size: 11px; color: var(--text-muted); }
        
        .plano-calorias {
            background: var(--accent);
            color: white;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }
        
        /* Dias Tabs */
        .dias-tabs {
            display: flex;
            gap: 4px;
            padding: 6px;
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 12px;
            margin-bottom: 16px;
            overflow-x: auto;
        }
        
        .dia-tab {
            flex: 1;
            min-width: 44px;
            padding: 10px 6px;
            background: transparent;
            border: none;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            cursor: pointer;
            text-align: center;
            position: relative;
        }
        
        .dia-tab.active { background: var(--primary); color: white; }
        
        .dia-tab.hoje::after {
            content: '';
            position: absolute;
            bottom: 3px;
            left: 50%;
            transform: translateX(-50%);
            width: 4px;
            height: 4px;
            background: var(--accent);
            border-radius: 50%;
        }
        
        .dia-tab.active.hoje::after { background: white; }
        
        .plano-dia { display: none; }
        .plano-dia.active { display: block; }
        
        /* Refeição */
        .refeicao { border-bottom: 1px solid var(--border); }
        .refeicao:last-child { border-bottom: none; }
        
        .refeicao-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            cursor: pointer;
        }
        
        .refeicao-header h5 {
            font-size: 13px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .refeicao-header h5 i {
            width: 30px;
            height: 30px;
            background: var(--primary);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 13px;
        }
        
        .refeicao-horario {
            font-size: 11px;
            color: var(--text-muted);
            background: var(--bg);
            padding: 4px 10px;
            border-radius: 20px;
        }
        
        .refeicao-content {
            padding: 0 16px 14px;
            display: none;
        }
        
        .refeicao.expanded .refeicao-content { display: block; }
        
        .alimento-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px;
            background: var(--bg);
            border-radius: 10px;
            margin-bottom: 6px;
        }
        
        .alimento-icon { font-size: 20px; }
        .alimento-nome { font-size: 13px; font-weight: 500; }
        .alimento-quantidade { font-size: 11px; color: var(--text-muted); }
        
        /* Lista de Compras */
        .compras-list { padding: 14px 16px; }
        .compras-categoria { margin-bottom: 16px; }
        
        .compras-categoria h4 {
            font-size: 12px;
            font-weight: 600;
            color: var(--primary);
            text-transform: uppercase;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .compra-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px;
            background: var(--bg);
            border-radius: 10px;
            margin-bottom: 6px;
        }
        
        .compra-check {
            width: 20px;
            height: 20px;
            border: 2px solid var(--border);
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: transparent;
            flex-shrink: 0;
        }
        
        .compra-check.checked {
            background: var(--accent);
            border-color: var(--accent);
            color: white;
        }
        
        .compra-nome { flex: 1; font-size: 13px; }
        .compra-nome.checked { text-decoration: line-through; color: var(--text-muted); }
        
        .compra-qtd {
            font-size: 11px;
            color: var(--text-muted);
            background: var(--card);
            padding: 3px 8px;
            border-radius: 10px;
        }
        
        /* Produtos Úteis */
        .produtos-uteis-grid {
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .produto-util-card {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: var(--bg);
            border-radius: 12px;
            text-decoration: none;
            color: inherit;
            transition: all 0.2s;
            border: 1px solid transparent;
        }
        
        .produto-util-card:hover {
            background: white;
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            transform: translateY(-2px);
        }
        
        .produto-util-card:active {
            transform: scale(0.98);
        }
        
        .produto-util-img {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: 10px;
            flex-shrink: 0;
            background: var(--card);
        }
        
        .produto-util-img-placeholder {
            width: 60px;
            height: 60px;
            border-radius: 10px;
            flex-shrink: 0;
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.5rem;
        }
        
        .produto-util-info {
            flex: 1;
            min-width: 0;
        }
        
        .produto-util-titulo {
            font-weight: 600;
            font-size: 13px;
            color: var(--text);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
        }
        
        .produto-util-desc {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 2px;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .produto-util-arrow {
            color: var(--text-muted);
            font-size: 14px;
            flex-shrink: 0;
            transition: transform 0.2s;
        }
        
        .produto-util-card:hover .produto-util-arrow {
            color: var(--primary);
            transform: translateX(3px);
        }
        
        /* Agenda Item */
        .agenda-item {
            padding: 14px;
            background: var(--bg);
            border-radius: 12px;
            margin-bottom: 10px;
        }
        
        .agenda-item.passado { opacity: 0.5; }
        
        .agenda-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        
        .agenda-date { font-size: 15px; font-weight: 600; }
        .agenda-tipo { font-size: 12px; color: var(--text-muted); }
        
        .agenda-actions {
            display: flex;
            gap: 6px;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px dashed var(--border);
        }
        
        .agenda-btn {
            flex: 1;
            padding: 10px;
            border-radius: 8px;
            border: none;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        
        .agenda-btn.confirm { background: var(--accent); color: white; }
        .agenda-btn.cancel { background: var(--bg-white); border: 1px solid var(--border); color: var(--text-secondary); }
        .agenda-btn.video { background: var(--info); color: white; }
        
        /* Profile */
        .profile-section {
            text-align: center;
            padding: 28px 20px;
        }
        
        .profile-avatar-container {
            position: relative;
            width: 100px;
            height: 100px;
            margin: 0 auto 16px;
        }
        
        .profile-avatar {
            width: 100px;
            height: 100px;
            background: var(--primary);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 36px;
            font-weight: 700;
            color: white;
            overflow: hidden;
        }
        
        .profile-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .profile-avatar-edit {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 32px;
            height: 32px;
            background: var(--accent);
            border: 3px solid var(--card);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 12px;
            cursor: pointer;
        }
        
        .profile-name {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 4px;
        }
        
        .profile-email {
            font-size: 13px;
            color: var(--text-muted);
        }
        
        .profile-actions {
            margin-top: 24px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .profile-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 14px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 600;
            text-decoration: none;
            border: none;
            cursor: pointer;
        }
        
        .profile-btn.whatsapp { background: #25d366; color: white; }
        .profile-btn.logout { background: var(--bg); border: 1px solid var(--border); color: var(--danger); }
        
        /* Chat Suporte */
        .chat-container {
            display: flex;
            flex-direction: column;
            height: calc(100dvh - 160px - var(--safe-top) - var(--safe-bottom));
            max-height: 500px;
        }
        
        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .chat-msg {
            max-width: 85%;
            padding: 12px 14px;
            border-radius: 16px;
            font-size: 13px;
            line-height: 1.4;
        }
        
        .chat-msg.enviada {
            align-self: flex-end;
            background: var(--primary);
            color: white;
            border-bottom-right-radius: 4px;
        }
        
        .chat-msg.recebida {
            align-self: flex-start;
            background: var(--bg);
            color: var(--text);
            border-bottom-left-radius: 4px;
        }
        
        .chat-msg .time {
            font-size: 10px;
            opacity: 0.7;
            margin-top: 4px;
            display: block;
        }
        
        .chat-input-area {
            padding: 12px 16px;
            border-top: 1px solid var(--border);
            background: var(--card);
        }
        
        .chat-tipo-select {
            display: flex;
            gap: 6px;
            margin-bottom: 10px;
        }
        
        .tipo-btn {
            flex: 1;
            padding: 8px;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg);
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            cursor: pointer;
        }
        
        .tipo-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .tipo-btn.urgente.active {
            background: var(--danger);
            border-color: var(--danger);
        }
        
        .chat-input-row {
            display: flex;
            gap: 8px;
        }
        
        .chat-input {
            flex: 1;
            padding: 12px 14px;
            border: 1px solid var(--border);
            border-radius: 24px;
            font-size: 14px;
            font-family: inherit;
            resize: none;
            max-height: 80px;
        }
        
        .chat-input:focus { outline: none; border-color: var(--primary); }
        
        .chat-send {
            width: 44px;
            height: 44px;
            background: var(--primary);
            border: none;
            border-radius: 50%;
            color: white;
            font-size: 18px;
            cursor: pointer;
            flex-shrink: 0;
        }
        
        .empty-chat {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-muted);
        }
        
        .empty-chat i {
            font-size: 40px;
            opacity: 0.3;
            margin-bottom: 12px;
        }
        
        /* Bottom Nav */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--card);
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: space-around;
            padding: 6px 6px;
            padding-bottom: calc(6px + var(--safe-bottom));
            z-index: 100;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            padding: 8px 10px;
            border-radius: 10px;
            text-decoration: none;
            color: var(--text-muted);
            font-size: 9px;
            font-weight: 600;
            min-width: 50px;
        }
        
        .nav-item i { font-size: 18px; }
        .nav-item.active { color: var(--primary); background: var(--primary-lighter); }
        
        /* Modal */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            display: none;
            align-items: flex-end;
            justify-content: center;
        }

.modal-content {
            background: var(--card);
            border-radius: 20px 20px 0 0;
            width: 100%;
            max-width: 500px;
            max-height: 80vh;
            overflow: hidden;
            animation: slideUp 0.3s ease;
        }
        
        @keyframes slideUp {
            from { transform: translateY(100%); }
            to { transform: translateY(0); }
        }
        
        .modal-header {
            padding: 16px;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .modal-header h3 { font-size: 16px; font-weight: 700; }
        
        .modal-close {
            width: 32px;
            height: 32px;
            background: var(--bg);
            border: none;
            border-radius: 8px;
            font-size: 16px;
            cursor: pointer;
        }
        
        .modal-body { padding: 16px; }
        
        .modal-body textarea {
            width: 100%;
            padding: 12px;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 14px;
            font-family: inherit;
            resize: none;
            min-height: 100px;
        }
        
        .modal-actions {
            display: flex;
            gap: 10px;
            margin-top: 16px;
        }
        
        .modal-btn {
            flex: 1;
            padding: 12px;
            border-radius: 10px;
            border: none;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
        }
        
        .modal-btn.cancel { background: var(--bg); color: var(--text-secondary); }
        .modal-btn.danger { background: var(--danger); color: white; }
        .modal-btn.primary { background: var(--primary); color: white; }
        
        /* Foto Upload */
        .foto-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .foto-preview {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            margin: 0 auto 16px;
            background: var(--bg);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border: 3px solid var(--border);
        }
        
        .foto-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .foto-preview i {
            font-size: 40px;
            color: var(--text-muted);
        }
        
        .foto-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 14px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            border: none;
        }
        
        .foto-btn.selecionar { background: var(--primary); color: white; }
        .foto-btn.remover { background: var(--bg); color: var(--danger); border: 1px solid var(--border); }
        
        #inputFoto { display: none; }
        
        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 32px 20px;
            color: var(--text-muted);
        }
        
        .empty-state i {
            font-size: 40px;
            opacity: 0.3;
            margin-bottom: 12px;
        }
        
        /* Toast */
        .toast-container {
            position: fixed;
            top: calc(20px + var(--safe-top));
            left: 50%;
            transform: translateX(-50%);
            z-index: 2000;
            width: 90%;
            max-width: 350px;
        }
        
        .toast {
            background: var(--card);
            border-radius: 12px;
            padding: 14px 16px;
            margin-bottom: 10px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
            display: flex;
            align-items: center;
            gap: 10px;
            animation: slideDown 0.3s ease;
        }
        
        @keyframes slideDown {
            from { transform: translateY(-20px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        
        .toast.success { border-left: 4px solid var(--success); }
        .toast.error { border-left: 4px solid var(--danger); }
        
        /* =========================================
           RESPONSIVIDADE COMPLETA
           ========================================= */
        
        /* Tablets */
        @media (max-width: 768px) {
            .main-content {
                padding-left: 12px;
                padding-right: 12px;
            }
            
            .header-content {
                padding: 0 4px;
            }
            
            .user-info h2 {
                font-size: 14px;
            }
            
            .card-header h3 {
                font-size: 14px;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .stat-card .value {
                font-size: 20px;
            }
            
            .agenda-item {
                padding: 12px;
            }
            
            .agenda-date {
                font-size: 14px;
            }
            
            .agenda-actions {
                flex-wrap: wrap;
            }
            
            .agenda-btn {
                padding: 8px 12px;
                font-size: 12px;
            }
            
            .dias-tabs {
                gap: 4px;
                padding: 12px;
            }
            
            .dia-tab {
                padding: 8px 10px;
                font-size: 11px;
            }
            
            .nav-item {
                padding: 6px 8px;
                font-size: 8px;
            }
            
            .nav-item i {
                font-size: 16px;
            }
        }
        
        /* Smartphones */
        @media (max-width: 480px) {
            .main-content {
                padding-top: calc(70px + var(--safe-top));
                padding-left: 10px;
                padding-right: 10px;
            }
            
            .app-header {
                padding: 10px 12px;
                padding-top: calc(10px + var(--safe-top));
            }
            
            .user-avatar {
                width: 36px;
                height: 36px;
                font-size: 13px;
            }
            
            .header-user {
                gap: 10px;
            }
            
            .user-info h2 {
                font-size: 13px;
            }
            
            .user-info span {
                font-size: 10px;
            }
            
            .header-btn {
                width: 34px;
                height: 34px;
                font-size: 14px;
            }
            
            .next-appointment {
                padding: 14px;
            }
            
            .next-appointment .date {
                font-size: 16px;
            }
            
            .btn-action {
                padding: 8px 12px;
                font-size: 12px;
            }
            
            .card {
                border-radius: 14px;
            }
            
            .card-header {
                padding: 14px 16px;
            }
            
            .card-header h3 {
                font-size: 13px;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }
            
            .stat-card {
                padding: 14px 10px;
            }
            
            .stat-card .icon {
                width: 36px;
                height: 36px;
                font-size: 14px;
            }
            
            .stat-card .value {
                font-size: 18px;
            }
            
            .stat-card .label {
                font-size: 10px;
            }
            
            .refeicao-header h5 {
                font-size: 12px;
            }
            
            .refeicao-header h5 i {
                width: 26px;
                height: 26px;
                font-size: 11px;
            }
            
            .refeicao-horario {
                font-size: 10px;
                padding: 3px 8px;
            }
            
            .agenda-item {
                padding: 10px;
            }
            
            .agenda-date {
                font-size: 13px;
            }
            
            .agenda-tipo {
                font-size: 11px;
            }
            
            .status-badge {
                font-size: 10px;
                padding: 3px 8px;
            }
            
            .agenda-actions {
                gap: 6px;
                margin-top: 10px;
            }
            
            .agenda-btn {
                padding: 7px 10px;
                font-size: 11px;
                flex: 1;
            }
            
            .dias-tabs {
                gap: 2px;
                padding: 10px;
                overflow-x: auto;
                flex-wrap: nowrap;
            }
            
            .dia-tab {
                padding: 6px 8px;
                font-size: 10px;
                min-width: auto;
            }
            
            .bottom-nav {
                padding: 4px 4px;
                padding-bottom: calc(4px + var(--safe-bottom));
            }
            
            .nav-item {
                padding: 6px 6px;
                font-size: 8px;
                min-width: 44px;
            }
            
            .nav-item i {
                font-size: 16px;
            }
            
            .chat-container {
                height: calc(100dvh - 140px - var(--safe-top) - var(--safe-bottom));
            }
            
            .chat-tipo-select {
                gap: 4px;
            }
            
            .tipo-btn {
                padding: 6px;
                font-size: 10px;
            }
            
            .chat-input {
                padding: 10px 12px;
                font-size: 13px;
            }
            
            .chat-send {
                width: 40px;
                height: 40px;
                font-size: 16px;
            }
            
            .modal-content {
                margin: 10px;
                border-radius: 16px 16px 0 0;
            }
            
            .modal-header {
                padding: 14px;
            }
            
            .modal-body {
                padding: 14px;
            }
            
            .modal-body textarea {
                min-height: 80px;
            }
            
            .profile-avatar {
                width: 80px;
                height: 80px;
                font-size: 28px;
            }
            
            .profile-avatar-container {
                width: 80px;
                height: 80px;
            }
            
            .profile-name {
                font-size: 16px;
            }
            
            .profile-email {
                font-size: 12px;
            }
            
            .profile-btn {
                padding: 12px;
                font-size: 13px;
            }
            
            .compra-item {
                padding: 8px;
            }
            
            .compra-check {
                width: 18px;
                height: 18px;
            }
            
            .compra-nome {
                font-size: 12px;
            }
            
            .produto-util-card {
                padding: 10px;
            }
            
            .produto-util-titulo {
                font-size: 12px;
            }
            
            .produto-util-desc {
                font-size: 10px;
            }
        }
        
        /* Telas muito pequenas */
        @media (max-width: 360px) {
            .header-btn {
                width: 32px;
                height: 32px;
            }
            
            .stats-grid {
                grid-template-columns: 1fr 1fr;
                gap: 8px;
            }
            
            .stat-card {
                padding: 10px 8px;
            }
            
            .stat-card .value {
                font-size: 16px;
            }
            
            .nav-item {
                min-width: 40px;
                padding: 4px;
            }
            
            .dia-tab {
                padding: 5px 6px;
                font-size: 9px;
            }
        }
        
        /* Estilos para seção de Documentos */
        .docs-lista {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .doc-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: var(--bg);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid transparent;
        }
        
        .doc-item:hover {
            background: #fff;
            border-color: var(--primary);
            transform: translateX(4px);
        }
        
        .doc-icon {
            width: 42px;
            height: 42px;
            background: var(--accent-light);
            color: var(--accent);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            flex-shrink: 0;
        }
        
        .doc-info {
            flex: 1;
            min-width: 0;
        }
        
        .doc-titulo {
            font-weight: 600;
            color: var(--text);
            font-size: 14px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .doc-meta {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 2px;
        }
        
        .doc-action {
            width: 36px;
            height: 36px;
            background: var(--danger);
            color: #fff;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            flex-shrink: 0;
        }
        
        .empty-state-mini {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 16px;
            background: var(--bg);
            border-radius: 10px;
            color: var(--text-muted);
            font-size: 13px;
        }
        
        .empty-state-mini i {
            font-size: 20px;
            opacity: 0.5;
        }

/* === [meu_paciente.php] bloco 2 (linha original ~3181) === */

body { font-family: 'Segoe UI', sans-serif; padding: 30px; color: #333; }
                        .header { background: #0f172a; color: #fff; padding: 20px; text-align: center; margin: -30px -30px 20px; }
                        .header h1 { font-size: 18px; margin-bottom: 5px; }
                        .header p { font-size: 11px; opacity: 0.8; }
                        .titulo { background: var(--brand-pastel); color: #fff; padding: 10px 15px; font-size: 14px; font-weight: 600; margin-bottom: 15px; }
                        .info { background: #f8fafc; padding: 12px 15px; margin-bottom: 15px; border-radius: 5px; }
                        .info span { display: block; font-size: 12px; margin-bottom: 5px; }
                        .info strong { color: #1e293b; }
                        .conteudo { padding: 15px 0; }
                        .item { padding: 8px 0; border-bottom: 1px dashed #e2e8f0; font-size: 13px; }
                        .obs { background: #fef3c7; padding: 12px; border-radius: 5px; font-size: 12px; margin-top: 20px; }
                        .assinatura { text-align: center; margin-top: 50px; }
                        .assinatura-linha { width: 200px; border-top: 1px solid #333; margin: 0 auto 5px; }
                        .assinatura-texto { font-size: 11px; color: #666; }
                        .footer { position: fixed; bottom: 0; left: 0; right: 0; background: #0f172a; color: #fff; padding: 8px; text-align: center; font-size: 10px; }
                        @media print { body { padding: 15px; } }

/* === [meu_paciente.php] bloco 3 (linha original ~3266) === */

body { font-family: 'Segoe UI', sans-serif; padding: 30px; color: #333; }
                        .header { background: #0f172a; color: #fff; padding: 20px; text-align: center; margin: -30px -30px 20px; }
                        .header h1 { font-size: 18px; margin-bottom: 5px; }
                        .header p { font-size: 11px; opacity: 0.8; }
                        .titulo { background: var(--brand-pastel); color: #fff; padding: 10px 15px; font-size: 14px; font-weight: 600; margin-bottom: 15px; }
                        .info { background: #f8fafc; padding: 12px 15px; margin-bottom: 15px; border-radius: 5px; }
                        .info span { display: block; font-size: 12px; margin-bottom: 5px; }
                        .info strong { color: #1e293b; }
                        .exames { columns: 2; column-gap: 20px; margin-bottom: 20px; }
                        .exame { font-size: 12px; padding: 5px 0; break-inside: avoid; display: flex; align-items: center; gap: 8px; }
                        .exame::before { content: "☐"; color: var(--brand-pastel); font-size: 14px; }
                        .obs { background: #fef3c7; padding: 12px; border-radius: 5px; font-size: 12px; margin-bottom: 30px; }
                        .obs strong { color: #92400e; }
                        .assinatura { text-align: center; margin-top: 50px; }
                        .assinatura-linha { width: 200px; border-top: 1px solid #333; margin: 0 auto 5px; }
                        .assinatura-texto { font-size: 11px; color: #666; }
                        .footer { position: fixed; bottom: 0; left: 0; right: 0; background: #0f172a; color: #fff; padding: 8px; text-align: center; font-size: 10px; }
                        @media print { body { padding: 15px; } .footer { position: fixed; } }

