/* CSS Principal - Design System Premium para Clínica Rocha & Alessi */

:root {
    /* Cores Globais */
    --bg-main: #0b0f19;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Temas de Especialidades (Aplicativo) */
    --urology-primary: #0ea5e9;
    --urology-secondary: #0284c7;
    --urology-bg: #0c1e35;
    
    --dermato-primary: #db2777;
    --dermato-secondary: #ec4899;
    --dermato-bg: #2d1222;

    /* Cores de Status */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* Fontes e Sombras */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.15);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================
   LAYOUT DO SIMULADOR CENTRALIZADO
   ========================================================== */
.app-display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 24px;
    background: radial-gradient(circle at 50% 30%, #131926 0%, #080b12 100%);
}

.app-display-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto 0;
    width: 100%;
    flex-shrink: 0;
}

.desktop-app-branding {
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.branding-icon {
    width: 38px;
    height: 38px;
    color: var(--urology-primary);
    filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.4));
    margin-bottom: 4px;
}

.desktop-app-branding h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 40%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.desktop-app-branding p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==========================================================
   SIMULADOR CELULAR (IPHONE / ANDROID)
   ========================================================== */
.phone-wrapper {
    position: relative;
    width: 375px;
    height: 720px;
    margin: 0 auto;
    flex-shrink: 0;
}

.phone-case {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #1e293b;
    border-radius: 48px;
    padding: 12px;
    box-shadow: 0 30px 60px -10px rgba(0,0,0,0.8),
                inset 0 0 4px 2px rgba(255,255,255,0.15),
                0 0 0 4px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.phone-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 25px;
    background: #000;
    border-radius: 20px;
    z-index: 50;
    box-shadow: inset 0 0 2px rgba(255,255,255,0.2);
}

.phone-screen {
    position: relative;
    flex: 1;
    background: #090d16;
    border-radius: 38px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    border: 1px solid rgba(0,0,0,0.4);
}

/* Status Bar do Celular */
.phone-status-bar {
    height: 40px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    z-index: 40;
    background: #090d16;
}

.phone-status-bar .icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.phone-status-bar .status-icon {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

/* ==========================================================
   BANNER DE NOTIFICAÇÃO PUSH NO CELULAR
   ========================================================== */
.phone-notification-banner {
    position: absolute;
    top: 45px;
    left: 12px;
    width: calc(100% - 24px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 12px 14px;
    z-index: 150;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transform: translateY(-150%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

.phone-notification-banner.active {
    transform: translateY(0);
    opacity: 1;
}

.notif-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.notif-logo-title {
    display: flex;
    align-items: center;
    gap: 4px;
}

.notif-logo {
    width: 12px;
    height: 12px;
    color: var(--urology-primary);
}

.notif-time {
    opacity: 0.8;
}

.phone-notification-banner .notif-body h5 {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.phone-notification-banner .notif-body p {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}

/* ==========================================================
   PATIENT APP UI
   ========================================================== */
.app-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: #090d16;
}

.app-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-profile .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--urology-primary), var(--urology-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.app-profile .greeting {
    font-size: 15px;
    font-weight: 600;
}

.app-profile .sub-greeting {
    font-size: 11px;
    color: var(--text-secondary);
}

.notif-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.notif-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-error);
    box-shadow: 0 0 6px var(--color-error);
}

/* App Content Area */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-tab-content {
    display: none;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.app-tab-content.active {
    display: flex;
}

/* Cartão de Próxima Consulta */
.next-appointment-card {
    background: linear-gradient(135deg, #0e1e35 0%, #0c1524 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-premium), var(--shadow-glow);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.next-appointment-card.dermato-theme {
    background: linear-gradient(135deg, #2d1222 0%, #1a0a14 100%);
    border: 1px solid rgba(219, 39, 119, 0.2);
    box-shadow: var(--shadow-premium), 0 0 20px rgba(219, 39, 119, 0.1);
}

.next-appointment-card .card-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--urology-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.next-appointment-card.dermato-theme .card-status {
    color: var(--dermato-secondary);
}

.next-appointment-card h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.next-appointment-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.btn-primary-small {
    background: linear-gradient(90deg, var(--urology-primary), var(--urology-secondary));
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.next-appointment-card.dermato-theme .btn-primary-small {
    background: linear-gradient(90deg, var(--dermato-primary), var(--dermato-secondary));
    box-shadow: 0 4px 12px rgba(219, 39, 119, 0.25);
}

.btn-primary-small:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

/* Grid de Ações */
.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.action-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icon-wrapper.blue {
    background: rgba(14, 165, 233, 0.1);
    color: var(--urology-primary);
}

.icon-wrapper.pink {
    background: rgba(219, 39, 119, 0.1);
    color: var(--dermato-primary);
}

.icon-wrapper.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.icon-wrapper.gold {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.action-card span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.badge-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-error);
    box-shadow: 0 0 4px var(--color-error);
}

/* Dicas de Saúde */
.tips-carousel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tip-card h5 {
    font-size: 14px;
    font-weight: 600;
    margin-top: 6px;
}

.tip-card p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 4px;
}

.tip-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 6px;
    border-radius: 12px;
    display: inline-block;
}

.tip-tag.urology {
    background: rgba(14, 165, 233, 0.1);
    color: var(--urology-primary);
}

.tip-tag.dermato {
    background: rgba(219, 39, 119, 0.1);
    color: var(--dermato-primary);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.carousel-indicators .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.carousel-indicators .dot.active {
    background: var(--text-primary);
}

/* ==========================================================
   FLUXO DE AGENDAMENTO (PACIENTE)
   ========================================================== */
.back-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 12px;
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--text-primary);
}

.back-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.booking-flow {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.flow-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity 0.3s;
}

.flow-step.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.flow-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doctor-select-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doctor-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
}

.doctor-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.doctor-card.selected {
    background: rgba(14, 165, 233, 0.06);
    border-color: var(--urology-primary);
}

.doctor-card.selected#doc-cristina {
    background: rgba(219, 39, 119, 0.06);
    border-color: var(--dermato-primary);
}

.doc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.doc-avatar.urology {
    background: rgba(14, 165, 233, 0.1);
    color: var(--urology-primary);
}

.doc-avatar.dermato {
    background: rgba(219, 39, 119, 0.1);
    color: var(--dermato-primary);
}

.doc-info h5 {
    font-size: 13px;
    font-weight: 600;
}

.doc-info p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.doc-badge {
    font-size: 9px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
}

/* Calendário Mini */
.calendar-mini {
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 12px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.calendar-header button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day.empty {
    cursor: default;
    pointer-events: none;
}

.calendar-day.inactive {
    color: var(--text-muted);
    opacity: 0.3;
    pointer-events: none;
}

.calendar-day.available {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
}

.calendar-day.available:hover {
    background: rgba(255, 255, 255, 0.1);
}

.calendar-day.selected {
    background: var(--urology-primary) !important;
    color: #000;
    font-weight: 700;
}

.calendar-day.selected-dermato {
    background: var(--dermato-primary) !important;
    color: #fff;
    font-weight: 700;
}

/* Slots de Horários */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.time-slot {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.time-slot:hover {
    background: rgba(255,255,255,0.08);
}

.time-slot.selected {
    background: var(--urology-primary);
    color: #000;
    border-color: var(--urology-primary);
}

.time-slot.selected-dermato {
    background: var(--dermato-primary);
    color: #fff;
    border-color: var(--dermato-primary);
}

.flow-step-action {
    margin-top: 10px;
}

.btn-confirm-booking {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--color-success);
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.2s;
}

.btn-confirm-booking:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

/* ==========================================================
   ENVIO DE EXAMES (PACIENTE)
   ========================================================== */
.exam-upload-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exam-upload-container .description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.upload-drag-area {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.01);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.upload-drag-area:hover {
    border-color: var(--urology-primary);
    background: rgba(14, 165, 233, 0.02);
}

.upload-icon {
    width: 38px;
    height: 38px;
    color: var(--text-secondary);
}

.upload-drag-area p {
    font-size: 13px;
    font-weight: 600;
}

.file-limits {
    font-size: 10px;
    color: var(--text-muted);
}

/* Caixa de Detalhes do Upload */
.upload-details-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.03);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.file-icon {
    width: 20px;
    height: 20px;
    color: var(--urology-primary);
}

.file-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-meta .filename {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.file-meta .filesize {
    font-size: 10px;
    color: var(--text-secondary);
}

.btn-remove-file {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.btn-remove-file:hover {
    color: var(--color-error);
}

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

.input-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group select,
.input-group textarea,
.input-group input {
    background: #0d121f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    outline: none;
}

.input-group select:focus,
.input-group textarea:focus,
.input-group input:focus {
    border-color: var(--urology-primary);
}

/* Lista de Exames Enviados */
.exams-list-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exams-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-exams-state {
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.empty-exams-state i {
    width: 24px;
    height: 24px;
}

.empty-exams-state p {
    font-size: 11px;
}

.patient-exam-card {
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s;
}

.exam-meta-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.exam-meta-wrapper .icon {
    color: var(--urology-primary);
}

.exam-meta-text h6 {
    font-size: 12px;
    font-weight: 600;
}

.exam-meta-text p {
    font-size: 9px;
    color: var(--text-secondary);
}

.status-badge-small {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
}

.status-badge-small.processing {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.status-badge-small.received {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
}

.status-badge-small.integrated {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

/* ==========================================================
   CHAT DE MENSAGENS (PACIENTE)
   ========================================================== */
.chat-header-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.back-btn-chat {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.chat-recipient {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recipient-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-icon {
    width: 18px;
    height: 18px;
    color: var(--urology-primary);
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-success);
    border: 2px solid #090d16;
}

.chat-recipient h5 {
    font-size: 13px;
    font-weight: 600;
}

.chat-recipient p {
    font-size: 10px;
    color: var(--color-success);
}

.chat-call-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
}

.chat-messages-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 4px;
    min-height: 320px;
}

.message-date {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    margin: 8px 0;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: fadeIn 0.2s;
}

.chat-bubble.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

.chat-bubble.sent {
    align-self: flex-end;
    background: var(--urology-primary);
    color: #000;
    font-weight: 500;
}

.chat-bubble.sent-dermato {
    align-self: flex-end;
    background: var(--dermato-primary);
    color: #fff;
}

.chat-bubble .message-time {
    font-size: 9px;
    align-self: flex-end;
    opacity: 0.6;
}

.chat-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.quick-reply {
    align-self: flex-start;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.quick-reply:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.chat-input-bar {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.chat-input-bar input {
    flex: 1;
    background: #0d121f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-primary);
    outline: none;
}

.chat-input-bar input:focus {
    border-color: var(--urology-primary);
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--urology-primary);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

/* Nav Bar do Celular */
.app-nav {
    height: 60px;
    background: #0a0e18;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 8px;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: color 0.2s;
}

.nav-item i {
    width: 18px;
    height: 18px;
}

.nav-item span {
    font-size: 10px;
    font-weight: 500;
}

.nav-item.active {
    color: var(--urology-primary);
}

/* ==========================================================
   MODAL DE NPS (PÓS-CONSULTA)
   ========================================================== */
.nps-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    justify-content: center;
    align-items: flex-end;
}

.nps-modal-overlay.active {
    display: flex;
}

.nps-modal-content {
    width: 100%;
    background: #0d1322;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nps-close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--text-secondary);
    cursor: pointer;
}

.nps-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.nps-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nps-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.nps-header p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

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

.nps-score-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.nps-numbers {
    display: flex;
    justify-content: space-between;
    gap: 2px;
}

.nps-num {
    flex: 1;
    aspect-ratio: 1;
    border-radius: 4px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.nps-num:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.nps-num.selected {
    background: var(--urology-primary);
    border-color: var(--urology-primary);
    color: #000;
}

.nps-dynamic-emoji {
    font-size: 32px;
    text-align: center;
}

.btn-submit-nps {
    background: linear-gradient(90deg, var(--urology-primary), var(--urology-secondary));
    color: #000;
    font-weight: 700;
    font-size: 13px;
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
}

.btn-submit-nps:hover {
    opacity: 0.95;
}

/* Indicação do Google Review */
.google-review-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    animation: fadeIn 0.3s;
}

.review-check {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-success);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-review-box h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-success);
}

.google-review-box p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.btn-google-review {
    background: #ea4335;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    margin-top: 4px;
    box-shadow: 0 4px 10px rgba(234, 67, 53, 0.3);
    transition: transform 0.2s;
}

.btn-google-review:hover {
    transform: translateY(-1px);
}

/* ==========================================================
   TOAST NOTIFICATION (DEMO)
   ========================================================== */
.demo-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0f172a;
    border: 1px solid var(--urology-primary);
    box-shadow: var(--shadow-premium), 0 0 15px rgba(14, 165, 233, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-toast.active {
    transform: translateY(0);
}

.demo-toast.success {
    border-color: var(--color-success);
    box-shadow: var(--shadow-premium), 0 0 15px rgba(16, 185, 129, 0.2);
}

.demo-toast.success i {
    color: var(--color-success);
}

.demo-toast i {
    width: 18px;
    height: 18px;
    color: var(--urology-primary);
}

.demo-toast span {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

/* ==========================================================
   ANIMATIONS KEYFRAMES
   ========================================================== */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================
   RESPONSIVIDADE E EXIBIÇÃO EM CELULARES DE VERDADE
   ========================================================== */
@media (max-width: 500px) {
    body {
        background: #090d16;
        overflow: auto;
    }
    
    .app-display-container {
        padding: 0;
        background: none;
        min-height: 100vh;
        justify-content: flex-start;
        overflow-y: visible;
    }
    
    .desktop-app-branding {
        display: none;
    }
    
    .app-display-content-wrapper {
        margin: 0;
        height: 100vh;
        width: 100%;
    }
    
    .phone-wrapper {
        width: 100%;
        height: 100vh;
        margin: 0;
    }
    
    .phone-case {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        background: none;
    }
    
    .phone-notch {
        display: none;
    }
    
    .phone-screen {
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    
    .phone-status-bar {
        padding-top: 12px;
        background: #090d16;
    }
    
    .demo-toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        justify-content: center;
    }
}

/* ==========================================================
   TELA DE CONSULTAS (iClinic)
   ========================================================== */
.appointments-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.appointments-list-container .description {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 4px;
}

.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.appointment-select-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-align: left;
}

.appointment-select-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.appointment-select-card.active-selection {
    background: rgba(14, 165, 233, 0.06);
    border-color: var(--urology-primary);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.1);
}

.appointment-select-card.active-selection.dermato-theme {
    background: rgba(219, 39, 119, 0.06);
    border-color: var(--dermato-primary);
    box-shadow: 0 0 15px rgba(219, 39, 119, 0.1);
}

.appointment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.appointment-doctor-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

.appointment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.appointment-avatar.urology {
    background: rgba(14, 165, 233, 0.1);
    color: var(--urology-primary);
}

.appointment-avatar.dermato {
    background: rgba(219, 39, 119, 0.1);
    color: var(--dermato-primary);
}

.appointment-details h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.appointment-details p {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.status-badge-small {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

.status-badge-small.processing {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.status-badge-small.received {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
}

.status-badge-small.integrated {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.appointment-time-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 6px;
    font-size: 10px;
    width: 100%;
}

.appointment-time-info .time-string {
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.appointment-time-info .time-string i {
    width: 12px;
    height: 12px;
    color: var(--text-secondary);
}

.active-selection-indicator {
    position: absolute;
    top: -6px;
    right: 12px;
    font-size: 8px;
    font-weight: 700;
    background: var(--urology-primary);
    color: #000;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.active-selection-indicator.dermato-indicator {
    background: var(--dermato-primary);
    color: #fff;
}

