/* 
 * Diário de Obra PWA - Folha de Estilo Core
 * Tema: Premium Dark-Glassmorphism & High Contrast Accent
 */

:root {
    --bg-main: #f5f5f7; /* Cinza claro ultra premium estilo Apple e escritório de arquitetura */
    --bg-card: #ffffff; /* Fundo branco limpo para os cartões */
    --bg-card-hover: #f9f9fb;
    --bg-sidebar: #ffffff; /* Lateral branca minimalista */
    --bg-hover: rgba(0, 0, 0, 0.04); /* Hover escurecido sutil */
    --border-color: #e5e7eb; /* Bordas finas cinzas */
    --border-active: #111111; /* Borda ativa preta */
    
    --text-primary: #111111; /* Texto preto para alto contraste e sofisticação */
    --text-secondary: #555555; /* Cinza escuro corporativo */
    --text-muted: #888888; /* Cinza médio de suporte */
    
    --primary: #111111; /* Preto como cor primária de branding */
    --primary-hover: #333333;
    --primary-glow: rgba(0, 0, 0, 0.08);
    --primary-gradient: linear-gradient(135deg, #111111 0%, #333333 100%);
    
    --success: #0f766e; /* Verde-água/petróleo sofisticado */
    --success-gradient: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
    --warning: #b45309; /* Bronze/âmbar refinado */
    --warning-gradient: linear-gradient(135deg, #b45309 0%, #92400e 100%);
    --danger: #b91c1c; /* Carmesim elegante */
    --danger-gradient: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    --accent: #4b5563;
    
    --font-sans: 'Lato', 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    --radius-sm: 6px; /* Bordas um pouco mais quadradas/arquitetônicas */
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

/* RESET E BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

input, button, textarea, select {
    font-family: inherit;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* EFEITO GLASSMORPHISM */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* PÁGINA DE LOGIN */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-color: var(--bg-main);
}

.login-container {
    width: 100%;
    max-width: 400px;
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.office-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 350px; /* Aumentado e responsivo */
    height: auto;
    min-height: 80px;
    margin: 0 auto 24px auto;
    background: transparent;
    border: none;
    overflow: hidden;
}

.office-logo-img {
    width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: contain; /* Preserva o aspect-ratio original do logotipo */
}

.default-logo svg {
    width: 64px;
    height: 64px;
    color: var(--primary);
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-card {
    padding: 32px 24px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* LAYOUT PRINCIPAL (DESKTOP/MOBILE RESPONSIVE) */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR (DESKTOP) */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: center; /* Centralizar logo */
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    overflow: hidden;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-brand h2 {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-menu {
    list-style: none;
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu-item a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.menu-item.active a {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.menu-item a svg {
    width: 20px;
    height: 20px;
}

.badge-future {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
    border-radius: 20px;
    margin-left: auto;
}

.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn-logout svg {
    width: 18px;
    height: 18px;
}

/* ÁREA DE CONTEÚDO PRINCIPAL */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 80px; /* Espaço para a Bottom Bar no mobile */
}

.top-bar {
    height: 70px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.top-bar h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.content-body {
    padding: 32px;
    flex-grow: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* BOTTOM BAR (MOBILE) */
.bottom-nav {
    display: none; /* Escondido no Desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 999;
}

.bottom-menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    list-style: none;
}

.bottom-menu-item {
    flex: 1;
}

.bottom-menu-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    transition: all 0.2s;
}

.bottom-menu-item a svg {
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
}

.bottom-menu-item.active a {
    color: var(--primary);
}

/* BOTÃO FLUTUANTE DE FOTO (MOBILE FAB CAMERA) */
.fab-camera {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 16px var(--primary-glow);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
    transform: translateY(-16px);
    border: 3px solid var(--bg-main);
    transition: all 0.2s;
}

.fab-camera:active {
    transform: translateY(-16px) scale(0.9);
}

.fab-camera svg {
    width: 26px;
    height: 26px;
}

/* ELEMENTOS DE FORMULÁRIO */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s;
    outline: none;
}

.input-wrapper input {
    padding-left: 48px;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* BOTÕES */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.btn.primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn.primary:hover {
    opacity: 0.95;
    box-shadow: 0 6px 16px var(--primary-glow);
}

.btn.primary:active {
    transform: scale(0.98);
}

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

.btn.secondary:hover {
    background: var(--bg-hover);
}

.btn.danger {
    background: var(--danger-gradient);
    color: #fff;
}

.btn.btn-block {
    width: 100%;
}

.btn.sm {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* ALERTAS */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.hidden {
    display: none !important;
}

/* CARDS E GRIDS */
.grid-obras {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card-obra {
    cursor: pointer;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card-obra::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.card-obra:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.2);
}

.obra-status {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.obra-status.em_andamento {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.obra-status.concluida {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.card-obra h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-obra p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.obra-meta {
    margin-top: auto;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

/* PAINEL INTERNO DA OBRA */
.obra-detalhes-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.obra-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.info-item label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.info-item span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* TABS */
.tabs-container {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    gap: 8px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn svg {
    width: 18px;
    height: 18px;
}

/* TIMELINE (DIÁRIO DE FOTOS) */
.timeline-container {
    position: relative;
    padding-left: 24px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4px;
    width: 2px;
    background: var(--border-color);
}

.timeline-day {
    position: relative;
    margin-bottom: 40px;
}

.timeline-day::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-main);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.timeline-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.timeline-date {
    font-size: 18px;
    font-weight: 600;
}

.timeline-badges {
    display: flex;
    gap: 8px;
}

.badge-clima {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.25);
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-clima.chuva {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-clima.nublado {
    background: rgba(156, 163, 175, 0.15);
    color: #d1d5db;
    border: 1px solid rgba(156, 163, 175, 0.25);
}

.timeline-card {
    padding: 24px;
}

.timeline-notes {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    white-space: pre-line;
}

/* GRID DE FOTOS NO DIÁRIO */
.foto-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.foto-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid var(--border-color);
    group: hover;
}

.foto-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.foto-item:hover img {
    transform: scale(1.05);
}

.foto-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    transition: opacity 0.2s ease;
}

.foto-item:hover .foto-overlay {
    opacity: 1;
}

.btn-delete-foto {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.85);
    border: none;
    color: #fff;
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    opacity: 0;
    z-index: 10;
}

.foto-item:hover .btn-delete-foto {
    opacity: 1;
}

.btn-delete-foto:hover {
    background: #ef4444;
    transform: scale(1.1);
}

.foto-desc-ia {
    font-size: 10px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* LEMBRETES ADESIVOS (POST-ITS) */
.lembretes-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.lembrete-card {
    padding: 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(180, 83, 9, 0.05) 100%);
    border: 1px solid rgba(251, 191, 36, 0.25);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s;
}

.lembrete-card.concluido {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border-color);
    opacity: 0.5;
}

.lembrete-card.concluido p {
    text-decoration: line-through;
    color: var(--text-muted);
}

.lembrete-card p {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.lembrete-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
}

.lembrete-actions {
    display: flex;
    gap: 8px;
}

.btn-toggle-lembrete, .btn-delete-lembrete {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.btn-toggle-lembrete:hover {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.btn-delete-lembrete:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* CRONOGRAMA SEMANAL (KANBAN/ACORDION) */
.cronograma-semana {
    margin-bottom: 24px;
}

.semana-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.semana-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.semana-progresso {
    width: 120px;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    display: block;
}

.semana-progresso-bar {
    height: 100%;
    background: var(--success-gradient);
    width: 0%;
    transition: width 0.3s ease;
}

.cronograma-atividades {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 12px;
}

.atividade-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.atividade-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.atividade-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chk-atividade {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.chk-atividade.concluido {
    background: var(--success);
    border-color: var(--success);
}

.chk-atividade svg {
    width: 12px;
    height: 12px;
    color: #fff;
    display: none;
}

.chk-atividade.concluido svg {
    display: block;
}

.atividade-texto {
    font-size: 14px;
}

.atividade-item.concluido .atividade-texto {
    text-decoration: line-through;
    color: var(--text-muted);
}

.atividade-dia {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--text-secondary);
}

/* MODAL / BOTTOM SHEET POPUPS */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Abre como Bottom Sheet no celular */
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-main);
    border-top: 1px solid var(--border-color);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
    .modal-overlay {
        align-items: center; /* Centralizado no desktop */
    }
    .modal-content {
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin: 20px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.btn-close-modal {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 50%;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* MURAL DE BRANDING E CONTATO NA TELA PÚBLICA (SHARE) */
.share-body {
    background-color: var(--bg-main);
    min-height: 100vh;
}

.share-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 16px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.share-logo {
    width: 100%;
    max-width: 210px; /* Reduzido em 40% e responsivo */
    height: auto;
    min-height: 60px;
    margin: 0 auto 12px auto;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    overflow: hidden;
}

.share-logo img {
    width: 100%;
    height: auto;
    max-height: 84px; /* Reduzido em 40% */
    object-fit: contain; /* Preserva o aspect-ratio original do logotipo */
}

.share-header h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.share-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.contact-pill-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.contact-pill.whatsapp {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.25);
    color: #4ade80;
}

.contact-pill svg {
    width: 14px;
    height: 14px;
}

.share-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* CARDS DE CUSTOS (MOCK / EXPANSÃO) */
.custos-resumo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.resumo-card {
    padding: 20px;
}

.resumo-card label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.resumo-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 4px;
}

.tabela-custos {
    width: 100%;
    border-collapse: collapse;
}

.tabela-custos th, .tabela-custos td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.tabela-custos th {
    font-weight: 600;
    color: var(--text-muted);
}

.tabela-custos tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* LOADING SPINNER */
.spinner-mini {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ANIMAÇÕES */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* RESPONSIVIDADE */
.mobile-only {
    display: none !important;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex !important;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px; /* Escondido fora da tela por padrão */
        width: 280px;
        height: 100vh;
        z-index: 10000; /* Acima de tudo */
        display: flex !important;
        flex-direction: column;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    }
    
    .sidebar.open {
        left: 0; /* Desliza para a tela */
    }
    
    .bottom-nav {
        display: block; /* Mostra bottom menu no mobile */
    }
    
    .top-bar {
        padding: 0 16px;
        height: 60px;
    }
    
    .top-bar h2 {
        font-size: 18px;
    }
    
    .content-body {
        padding: 16px;
    }
    
    .grid-obras {
        gap: 16px;
    }
    
    .timeline-card {
        padding: 16px;
    }
    
    .foto-gallery {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
}

.office-branded-footer a:hover {
    color: var(--primary) !important;
}
