body { 
    background: #000000;
    color: #e9eef5; 
    font-family: 'Montserrat', sans-serif; 
    min-height: 100vh;
}

/* Sidebar removida: sem padding lateral */
@media (min-width: 768px) {
    body { padding-left: 0; }
}

/* Mobile: no body padding, sidebar slides from left */
@media (max-width: 767px) {
    body { padding-left: 0 !important; }
    main { padding-top: 0 !important; }
}

.tab-content { display: none; animation: fadeIn 0.3s ease-in-out; }
.tab-content.active { display: block; }

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

input, select, textarea { 
    background-color: #000000; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    color: #e9eef5; 
    padding: 12px; 
    border-radius: 10px; 
    width: 100%; 
    transition: all 0.2s; 
    font-size: 0.95rem; 
}

input:focus, select:focus, textarea:focus { 
    outline: none; 
    border-color: #ffffff; 
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2); 
    background-color: #000000; 
}

.glass-sidebar { 
    background: rgba(15, 23, 42, 0.95); 
    backdrop-filter: blur(10px); 
    border-right: 1px solid rgba(148, 163, 184, 0.2); 
}

.glass-card { 
    background: rgba(15, 23, 42, 0.8); 
    backdrop-filter: blur(12px); 
    border: 1px solid rgba(148, 163, 184, 0.2); 
    box-shadow: 0 4px 6px -1px rgba(2, 6, 23, 0.4); 
}

.modal-glass { 
    background: rgba(15, 23, 42, 0.98); 
    backdrop-filter: blur(16px); 
    border: 1px solid rgba(148, 163, 184, 0.25); 
    box-shadow: 0 25px 50px -12px rgba(2, 6, 23, 0.9); 
}

.nav-btn { 
    border-radius: 12px; 
    transition: all 0.2s; 
    color: #b0b0b0; 
    font-weight: 500; 
}

.nav-btn:hover { 
    background-color: rgba(255, 255, 255, 0.08); 
    color: #ffffff; 
}

.nav-btn.active { 
    background: rgba(255, 255, 255, 0.12); 
    color: #ffffff; 
    border-left: 3px solid #ffffff; 
}

/* Layout helpers */
.main-shell { width: 100%; max-width: 1400px; margin: 0 auto; }
.content-wrap { margin-left: 0; }

/* Calendars full width */
.calendar-shell { width: 100%; }
.calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }

/* Fix shrinking boards */
.board-scroll { overflow-x: auto; }
.board-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.custom-checkbox input:checked + div { 
    background-color: #a855f7; 
    border-color: #a855f7; 
}

.no-scrollbar::-webkit-scrollbar { display: none; }

.line-clamp-custom { 
    display: -webkit-box; 
    -webkit-line-clamp: 6; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.mood-btn.selected { 
    transform: scale(1.2); 
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5)); 
}

#day-status-bom.selected { 
    background-color: #10b981; 
    border-color: #059669; 
}

#day-status-ruim.selected { 
    background-color: #ef4444; 
    border-color: #dc2626; 
}

#routine-calendar > div { 
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 112px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000000; }
::-webkit-scrollbar-thumb { background: #333333; border-radius: 3px; }

/* ===== PWA & MOBILE RESPONSIVENESS ===== */

/* Mobile First */
@media (max-width: 767px) {
    body { padding-left: 0 !important; }
    
    .glass-sidebar { 
        position: fixed;
        left: -100%;
        transition: left 0.3s ease;
        z-index: 50;
    }
    
    .glass-sidebar.active { left: 0; }
    
    main { padding: 1rem !important; }
    
    .glass-card { padding: 1rem !important; }
    
    /* Grid adaptativo */
    .grid.sm\:grid-cols-2,
    .grid.lg\:grid-cols-3,
    .grid.grid-cols-2,
    .grid.grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    /* Calendários e grids de 7 colunas ficam fluidos em telas menores */
    .grid.grid-cols-7,
    .calendar-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
        gap: 0.5rem !important;
    }
    
    /* Formulários em coluna */
    form.flex { flex-direction: column; }
    form.flex > * { width: 100% !important; }
    
    /* Botões maiores para touch */
    button, .btn, a.btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }
    
    /* Inputs maiores */
    input, select, textarea {
        min-height: 44px;
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    /* Títulos menores */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    
    /* Tabelas scroll horizontal */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Dashboard cards ajustados */
    .board-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .grid.lg\:grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    
    .glass-sidebar {
        width: 16rem;
    }
    
    body { padding-left: 16rem; }
}

/* Landscape mobile */
@media (max-width: 900px) and (orientation: landscape) {
    .glass-card { padding: 0.75rem !important; }
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    button, a, input[type="submit"], .btn, .nav-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-btn { padding: 0.75rem 1rem; }
}

/* Telas muito pequenas */
@media (max-width: 375px) {
    body { font-size: 14px; }
    main { padding: 0.75rem !important; }
    .glass-card { padding: 0.75rem !important; }
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.1rem !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
