From fb842d98a554aa41eca9b80da44b82f19315d947 Mon Sep 17 00:00:00 2001 From: VPS 4 Deploy Agent Date: Wed, 3 Jun 2026 19:53:53 +0200 Subject: [PATCH] chore(deploy): responsive mobile layout exact clone from mockup --- .../dental-client/public/version.txt | 2 +- dental-server/dental-client/src/index.css | 443 ++++++------------ dental-server/package-lock.json | 4 +- dental-server/package.json | 2 +- 4 files changed, 157 insertions(+), 294 deletions(-) diff --git a/dental-server/dental-client/public/version.txt b/dental-server/dental-client/public/version.txt index 02cd1fb..b0f3d96 100644 --- a/dental-server/dental-client/public/version.txt +++ b/dental-server/dental-client/public/version.txt @@ -1 +1 @@ -2.1.69 +1.0.8 diff --git a/dental-server/dental-client/src/index.css b/dental-server/dental-client/src/index.css index c93a488..640b280 100644 --- a/dental-server/dental-client/src/index.css +++ b/dental-server/dental-client/src/index.css @@ -707,299 +707,162 @@ body { /* ================================================================ RESPONSIVO — Tablet/Mobile (≤ 1023px) - O visual desktop (≥ 1024px) permanece intacto. + (Clone fiel do Mockup Mobile Alvo) ================================================================ */ @media (max-width: 1023px) { - /* ---- Altura real em mobile (evita pulo da barra de URL) ---- */ - .app-container { height: 100dvh; } - - /* ---- Top bar fixo ---- */ - .mobile-topbar { - display: flex; align-items: center; gap: 12px; - position: fixed; top: 0; left: 0; right: 0; height: 56px; - padding: 0 14px; z-index: 1000; - background: var(--glass-bg); - backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); - border-bottom: 1px solid var(--glass-border); - box-shadow: var(--shadow-sm); - } - .mobile-hamburger { - width: 42px; height: 42px; flex-shrink: 0; - border: none; background: transparent; cursor: pointer; - font-size: 1.3rem; color: var(--dark-color); - border-radius: 10px; display: flex; align-items: center; justify-content: center; - transition: background 0.2s; - } - .mobile-hamburger:active { background: rgba(0,0,0,0.06); } - .mobile-topbar-brand { - display: flex; align-items: center; gap: 9px; - font-family: var(--font-heading); font-weight: 700; - font-size: 1.05rem; color: var(--dark-color); - } - .mobile-topbar-logo { - width: 30px; height: 30px; flex-shrink: 0; - background: linear-gradient(135deg, #4cc9f0, var(--primary-color)); - border-radius: 8px; color: #fff; - display: flex; align-items: center; justify-content: center; font-size: 15px; - } - .mobile-topbar-spacer { margin-left: auto; } - - /* ---- Sidebar vira drawer deslizante ---- */ - .app-container { flex-direction: row; } - .sidebar { - position: fixed; top: 0; left: 0; bottom: 0; - width: 280px; max-width: 84vw; height: 100dvh; - transform: translateX(-105%); - transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1); - z-index: 1200; box-shadow: var(--shadow-lg); - border-right: 1px solid var(--glass-border); - } - .sidebar--mobile-open { transform: translateX(0); } - - .sidebar-backdrop { - display: block; position: fixed; inset: 0; - background: rgba(15,23,42,0.5); - backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); - z-index: 1150; opacity: 0; pointer-events: none; - transition: opacity 0.28s ease; - } - .sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; } - - .sidebar-header { position: relative; padding: 18px 20px; } - .sidebar-close { - display: flex; align-items: center; justify-content: center; - position: absolute; top: 14px; right: 12px; - width: 36px; height: 36px; border: none; background: transparent; - font-size: 1.2rem; color: var(--text-secondary); cursor: pointer; border-radius: 8px; - } - .sidebar-close:active { background: rgba(0,0,0,0.06); } - - .nav-item { padding: 13px 14px; font-size: 1rem; } /* alvo de toque maior */ - .nav-item:hover { transform: none; } /* sem deslocamento em touch */ - - /* ---- Conteúdo principal abaixo do top bar ---- */ - .main-content { padding-top: 56px; } - .content-scroll { padding: 16px; } - - /* ---- Header da página: empilha, busca full-width ---- */ - .header { padding: 12px 16px; } - .header-content { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; } - .header-left { flex: 1; min-width: 50%; } - .header h1 { font-size: 1.15rem; } - .header-actions { width: auto; flex: none; flex-wrap: nowrap; gap: 8px; align-items: center; } - .search-input { min-width: 0; flex: 1 1 100%; width: 100%; font-size: 16px; } /* 16px evita zoom iOS */ - .client-filter { flex: 1 1 100%; min-width: 0; width: 100%; } - - /* Alterna ações entre desktop (linha) e mobile (dropdown) */ - .hide-mobile { display: none !important; } - .show-mobile { display: inline-flex !important; } - - .mobile-icon-actions { display: flex !important; gap: 6px; align-items: center; } - .btn-icon { - width: 40px !important; - height: 40px !important; - border-radius: 50% !important; - display: flex !important; - align-items: center; - justify-content: center; - padding: 0 !important; - font-size: 1.2rem; - background: var(--bg-surface); - border: 1px solid var(--border-color); - color: var(--text-primary); - } - .btn-icon:active { background: var(--hover-color); transform: scale(0.95); } - - /* ---- Grid de cards: thumbnails menores ---- */ - .images-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; } - .image-preview { height: 150px; } - .image-info { padding: 12px; } - .image-patient-name { font-size: 0.95rem; } - - /* ================================================================ - TABELAS → CARDS EMPILHADOS - Aplicado a tabelas com a classe .responsive-table - ================================================================ */ - .responsive-table thead { display: none; } - .responsive-table, - .responsive-table tbody, - .responsive-table tr, - .responsive-table td { display: block; width: 100%; } - - .responsive-table tr { - background: var(--bg-surface) !important; - border: 1px solid var(--border-color) !important; - border-radius: var(--radius) !important; - box-shadow: var(--shadow-sm); - margin-bottom: 12px; padding: 6px 4px; overflow: hidden; - } - .responsive-table tr:hover { background: var(--bg-surface) !important; } - - .responsive-table td { - display: flex; align-items: center; justify-content: space-between; - gap: 14px; text-align: right; - padding: 9px 14px !important; - border: none !important; - max-width: none !important; white-space: normal !important; - overflow: visible !important; - } - .responsive-table td::before { - content: attr(data-label); - font-weight: 700; font-size: 0.7rem; - text-transform: uppercase; letter-spacing: 0.04em; - color: var(--text-secondary); - text-align: left; flex-shrink: 0; white-space: nowrap; - } - /* Células sem rótulo (thumb/avatar) ocupam o topo, centralizadas */ - .responsive-table td[data-label=""]::before { display: none; } - .responsive-table td[data-label=""] { justify-content: center; padding-top: 12px !important; } - /* Célula de ações: botões espalhados, ocupando largura */ - .responsive-table td[data-label="Ações"] { justify-content: flex-end; flex-wrap: wrap; } - - /* ---- Stat cards (filtros GTO) encolhem ---- */ - .stat-card-row { gap: 10px !important; } - .stat-card-row > * { min-width: 0 !important; flex: 1 1 30% !important; padding: 12px !important; } - - /* ---- Paginação: centraliza e quebra linha ---- */ - .pagination-bar { flex-direction: column !important; gap: 10px !important; align-items: center !important; } - .pagination-controls { flex-wrap: wrap; justify-content: center; } - - /* ---- Modais: tela cheia ---- */ - .modal-overlay { align-items: stretch; } - .modal-content, .modal-large { - width: 100% !important; height: 100dvh !important; - max-width: 100% !important; border-radius: 0 !important; - } - - /* ---- Modal header compacto ---- */ - .modal-header { padding: 12px 16px; } - .modal-header h2 { - font-size: 0.95rem; - overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - max-width: 55vw; - } - .modal-title-group { - flex-wrap: wrap; gap: 8px; - width: 100%; - } - .modal-actions-group { gap: 4px; } - .modal-actions-group .btn { width: 36px; height: 36px; font-size: 1rem; } - .modal-body { padding: 12px; } - - /* ---- TransformModal: layout mobile otimizado ---- */ - .new-transform-layout { - flex-direction: column; align-items: center; - gap: 12px; padding: 8px 0; min-height: auto; - } - .transform-panel { - max-width: 100%; width: 100%; - padding: 8px; border-radius: var(--radius-sm); - } - .transform-panel .img-container { - max-height: none; aspect-ratio: auto; - min-height: 200px; - } - .transform-panel img { - max-width: 90%; max-height: 90%; - } - /* Painel original oculto por padrão no mobile (mostrado via CollapsibleSection) */ - .transform-panel.panel-original.mobile-collapsible { - display: none; - } - .panel-title { font-size: 0.85rem; margin-bottom: 8px; } - - /* Barra de controles de rotação — horizontal fixa no bottom */ - .transform-sidebar { - width: 100%; flex-direction: row; - border-radius: var(--radius-lg); - justify-content: space-around; - padding: 10px; gap: 6px; - position: sticky; bottom: 0; - z-index: 10; - background: var(--bg-surface); - border: 1px solid var(--border-color); - box-shadow: 0 -4px 12px rgba(0,0,0,0.08); - } - .sidebar-btn { width: 48px; height: 48px; } - .sidebar-btn .icon { font-size: 1rem; } - .sidebar-btn .label { font-size: 0.6rem; } - .fine-tune-display { margin: 0 !important; min-width: 50px; } - - /* Área de ação do transform — compacta */ - .transform-action-area { - margin-top: 12px; padding: 12px; - border-radius: var(--radius-sm); - } - - /* Escolha de orientação — thumbnails */ - .transform-choose-grid { - grid-template-columns: repeat(4, 1fr) !important; - gap: 8px !important; - } - - /* ---- GTO dentro do TransformModal: cards compactos ---- */ - .gto-create-section { padding: 14px; } - .gto-create-section .form-actions-inline { - flex-direction: column; - } - .gto-create-section .form-control { width: 100% !important; flex: none !important; } - .gto-link-section { flex-direction: column; gap: 10px; align-items: stretch; } - - /* ---- Cards de paciente: ocultar remark no mobile ---- */ - .image-doctor-remark { display: none; } - - /* ---- Extra info panel compacto ---- */ - .extra-info-panel { padding: 10px 14px; font-size: 0.85rem; margin-bottom: 12px; } - - /* ---- Botões maiores para toque ---- */ - .btn { min-height: 40px; } - - /* ---- Form actions empilham no mobile ---- */ - .form-actions-inline { flex-direction: column; gap: 8px; } - .form-actions-inline .btn { width: 100%; } - - /* ---- Toast no mobile ---- */ - .toast-container { bottom: 16px; right: 16px; left: 16px; } - .toast { max-width: 100%; font-size: 0.9rem; padding: 12px 16px; } + /* ── App shell ── */ + .app-container { flex-direction: column; height: 100%; background: #F4F5F8; padding-top: 50px; } + .main-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0; background: #F4F5F8; } + + /* ── Topbar (Fixo) ── */ + .mobile-topbar { + display: flex; align-items: center; justify-content: space-between; + padding: 8px 14px 10px; background: #FFFFFF; border-bottom: 1px solid #EBECF1; + position: fixed; top: 0; left: 0; right: 0; height: 50px; z-index: 1000; + } + .mobile-hamburger { + width: 38px; height: 38px; border: none; background: transparent; cursor: pointer; + font-size: 1.3rem; color: #15172B; display: flex; align-items: center; justify-content: center; + } + .mobile-topbar-brand { + display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; color: #15172B; + } + .mobile-topbar-logo { + width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg,#3B82F6,#6366F1); + color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(79,70,229,.3); + } + + /* ── Toolbar de Pesquisa (Header do Dashboard) ── */ + .header { + background: #FFFFFF; padding: 8px 14px 12px; border-bottom: 1px solid #EBECF1; + display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; + } + .header-content { flex-direction: column; align-items: stretch; gap: 10px; } + .header-left { display: none; } /* Ocultar título gigante do desktop */ + .header-actions { display: flex; flex-direction: column; gap: 10px; } + + .search-input { + width: 100%; background: #F1F2F6; border-radius: 12px; padding: 10px 13px; + border: none; font-size: 15px; color: #15172B; outline: none; box-shadow: none; + } + .client-filter { + width: 100%; background: #F1F2F6; border-radius: 12px; padding: 10px 13px; + border: none; font-size: 15px; color: #15172B; box-shadow: none; height: auto; + } + + .content-scroll { padding: 0; flex: 1; } + + /* ── Galeria Grid (Pacientes / Imagens) ── */ + .images-grid { + display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; + } + .patient-card, .image-card { + background: #FFFFFF; border-radius: 16px; overflow: hidden; + box-shadow: 0 1px 2px rgba(20,21,42,.04), 0 4px 14px rgba(20,21,42,.05); + border: none; display: flex; flex-direction: column; + } + + .image-preview { + position: relative; width: 100%; aspect-ratio: 1 / 0.82; height: auto; background: #0C1020; + } + .image-preview img { width: 100%; height: 100%; object-fit: cover; } + + .image-info { padding: 9px 10px 11px; display: flex; flex-direction: column; } + .image-patient-name { font-weight: 700; font-size: 14.5px; color: #15172B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; } + .image-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #9295AD; font-weight: 500; margin-top: 3px; } + + /* Chips */ + .patient-count-badge { + position: absolute; bottom: 8px; left: 8px; right: auto; top: auto; + background: rgba(10,13,24,.62); backdrop-filter: blur(6px); color: #fff; + font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; + } + .image-badge { + position: absolute; top: 8px; left: 8px; font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; letter-spacing: .2px; + } + .delete-patient-btn { display: none; } /* Ocultar do grid mobile */ + .image-doctor-remark { display: none; } + + /* ── Drawer Lateral (Sidebar) ── */ + .sidebar { + position: fixed; top: 0; left: 0; bottom: 0; width: 86%; max-width: 332px; height: 100%; + background: #FFFFFF; transform: translateX(-105%); transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1); + z-index: 1200; box-shadow: 0 0 60px rgba(0,0,0,.28); border: none; padding: 0; display: flex; flex-direction: column; + } + .sidebar--mobile-open { transform: translateX(0); } + + .sidebar-backdrop { + display: block; position: fixed; inset: 0; background: rgba(10,13,24,.38); + backdrop-filter: blur(2px); z-index: 1150; opacity: 0; pointer-events: none; transition: opacity 0.28s ease; + } + .sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; } + + .sidebar-header { + display: flex; align-items: center; gap: 10px; padding: 52px 14px 16px; border-bottom: 1px solid #EBECF1; flex-shrink: 0; background: #fff; + } + .sidebar-header h2 { font-size: 16px; color: #15172B; margin: 0; flex: 1; display: flex; align-items: center; gap: 8px; } + .sidebar-header h2 span { font-size: 11px; font-weight: 700; color: #9295AD; background: #F1F2F6; padding: 2px 7px; border-radius: 6px; } + + .logo-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; } + + .sidebar-close { + width: 36px; height: 36px; border: none; background: transparent; font-size: 1.2rem; color: #9295AD; cursor: pointer; display: flex; align-items: center; justify-content: center; + } + + .sidebar-nav { padding: 6px 12px 12px; flex: 1; overflow-y: auto; } + + .nav-section-title { + font-size: 11.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: #9295AD; padding: 16px 12px 8px; margin: 0; opacity: 1; + } + + .nav-item { + display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 13px; font-weight: 600; font-size: 15.5px; color: #15172B; background: transparent; width: 100%; text-align: left; margin-bottom: 2px; + } + .nav-item.active { background: #4F46E5; color: #fff !important; box-shadow: 0 6px 16px rgba(79,70,229,.3); } + .nav-item i { font-size: 18px; width: 22px; text-align: center; } + + .sidebar-footer { padding: 12px 16px 26px; border-top: 1px solid #EBECF1; flex-shrink: 0; background: #fff; } + .logout-btn { + display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px; border-radius: 13px; border: 1.5px solid #EBECF1; background: transparent; color: #454867; font-weight: 700; font-size: 15px; + } + + /* ── Modais e Tabelas (Adaptação Geral) ── */ + .modal-overlay { align-items: flex-end; padding: 0; } + .modal-content, .modal-large { + width: 100% !important; max-height: 90vh !important; height: auto !important; + border-radius: 24px 24px 0 0 !important; background: #FFFFFF; padding: 8px 14px 30px; box-shadow: 0 -8px 40px rgba(0,0,0,.25); + } + .modal-header { padding: 12px 4px 16px; border: none; } + .modal-header h2 { font-weight: 800; font-size: 16px; color: #15172B; } + .modal-body { padding: 0; } + + .form-control, .form-group input, .form-group select, .form-group textarea { + width: 100%; border: 1.5px solid #EBECF1; border-radius: 12px; padding: 13px 14px; font-size: 15px; color: #15172B; background: #FBFBFD; outline: none; + } + .form-control:focus, .form-group input:focus { border-color: #4F46E5; background: #fff; box-shadow: none; } + .form-group label { font-size: 13.5px; font-weight: 700; color: #15172B; } + + .btn { min-height: 44px; border-radius: 12px; font-size: 15px; } + .form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; } + .form-actions .btn { width: 100%; } + + /* Esconder tabela complexa e mostrar cards simples no admin/clientes */ + .responsive-table thead { display: none; } + .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; } + .responsive-table tr { background: #FFFFFF; border-radius: 14px; padding: 12px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(20,21,42,.04); border: none; } + .responsive-table td { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 !important; border: none !important; } + .responsive-table td::before { content: attr(data-label); font-size: 12px; color: #9295AD; font-weight: 600; } + + /* Viewer */ + .new-transform-layout { flex-direction: column; padding: 0; background: #05070e; min-height: 100vh; } + .transform-panel { width: 100%; max-width: 100%; border: none; border-radius: 0; background: transparent; padding: 0; flex: 1; display: flex; align-items: center; justify-content: center; } + .transform-panel img { max-width: 95%; max-height: 95%; } + .transform-sidebar { position: fixed; bottom: 0; left: 0; right: 0; width: 100%; flex-direction: row; justify-content: space-evenly; background: #15172B; border: none; border-radius: 20px 20px 0 0; padding: 16px 16px 30px; } + .sidebar-btn { width: auto; height: auto; border: none; background: transparent; color: #fff; border-radius: 0; gap: 6px; } + .sidebar-btn .icon { font-size: 20px; margin: 0; } + .sidebar-btn .label { font-size: 11px; font-weight: 500; color: #9295AD; } } -/* ================================================================ - RESPONSIVO — Celular (≤ 480px) - ================================================================ */ @media (max-width: 480px) { - .content-scroll { padding: 12px; } - .images-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } - .image-preview { height: 130px; } - .image-info { padding: 10px; } - .image-patient-name { font-size: 0.85rem; } - .image-meta { font-size: 0.75rem; } - .stat-card-row > * { flex: 1 1 100% !important; } - .header h1 { font-size: 1.15rem; } - .modal-header h2 { font-size: 0.9rem; max-width: 45vw; } - .modal-actions-group .btn { width: 32px; height: 32px; font-size: 0.9rem; } - - /* TransformModal — preview ainda maior */ - .transform-panel img { max-width: 95%; max-height: 95%; } - .sidebar-btn { width: 44px; height: 44px; } - - /* Paginação: só anterior/próximo */ - .pagination-controls .btn:not(:first-child):not(:last-child) { display: none; } - - /* Collapsible mais compacto */ - .collapsible-header { padding: 10px 12px; font-size: 0.78rem; } - .collapsible-body { padding: 0 12px 12px; } -} - -/* ================================================================ - RESPONSIVO — Celular pequeno (≤ 360px / 320px) - ================================================================ */ -@media (max-width: 360px) { - .content-scroll { padding: 10px; } - .images-grid { grid-template-columns: 1fr; } - .image-preview { height: 160px; } - .mobile-topbar-brand span:not(.mobile-topbar-logo) { font-size: 0.95rem; } - .responsive-table td { font-size: 0.85rem; } - .btn { font-size: 0.88rem; padding: 9px 14px; } - .sidebar-btn { width: 40px; height: 40px; } - .sidebar-btn .label { display: none; } + /* Os estilos acima já cobrem celular */ } diff --git a/dental-server/package-lock.json b/dental-server/package-lock.json index de883bc..9cf5c18 100644 --- a/dental-server/package-lock.json +++ b/dental-server/package-lock.json @@ -1,12 +1,12 @@ { "name": "dental-image-server", - "version": "2.1.4", + "version": "2.1.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dental-image-server", - "version": "2.1.4", + "version": "2.1.5", "license": "MIT", "dependencies": { "@aws-sdk/client-s3": "^3.1055.0", diff --git a/dental-server/package.json b/dental-server/package.json index 9665e64..b02af8e 100644 --- a/dental-server/package.json +++ b/dental-server/package.json @@ -1,6 +1,6 @@ { "name": "dental-image-server", - "version": "2.1.4", + "version": "2.1.5", "description": "Servidor Socket.IO para receber e processar imagens dentais com interface web", "main": "server.js", "scripts": {