/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease-out;
}

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

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

.login-header h1 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.login-tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 10px;
    background: #f8f9fa;
    padding: 5px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* App Layout */
.app-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    color: #667eea;
    font-size: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.app-nav {
    background: white;
    padding: 0 30px;
    display: flex;
    gap: 5px;
    border-bottom: 1px solid #e9ecef;
}

.nav-btn {
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
}

.nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.nav-btn:hover {
    background: #f8f9fa;
}

.app-main {
    background: #f8f9fa;
    min-height: calc(100vh - 120px);
    padding: 30px;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h2 {
    color: #333;
    font-size: 1.8rem;
}

.date-selector input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2rem;
    color: #667eea;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.dashboard-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.dashboard-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.dashboard-section:last-child {
    grid-column: 1 / -1;
}

/* Appointments and Tasks Lists */
.appointments-list,
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.appointment-item,
.task-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.appointment-item h4,
.task-item h4 {
    color: #333;
    margin-bottom: 5px;
}

.appointment-item p,
.task-item p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.appointment-time {
    color: #667eea;
    font-weight: 500;
}

.task-priority {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}

.task-priority.alta {
    background: #ffebee;
    color: #c62828;
}

.task-priority.media {
    background: #fff3e0;
    color: #ef6c00;
}

.task-priority.baixa {
    background: #e8f5e8;
    color: #2e7d32;
}

/* Daily Note */
.daily-note {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.daily-note textarea {
    min-height: 120px;
    resize: vertical;
}

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

.calendar-controls {
    display: flex;
    gap: 10px;
}

.calendar-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.calendar-navigation span {
    font-size: 1.2rem;
    font-weight: 500;
    min-width: 150px;
    text-align: center;
}

.calendar-content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Kanban */
.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.kanban-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.kanban-controls select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.kanban-column {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.kanban-column h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.kanban-tasks {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 400px;
}

.kanban-task {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.kanban-task:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.kanban-task h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.kanban-task p {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.kanban-task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.kanban-task-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.kanban-task-actions button {
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 5px;
}

/* Projects */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.projects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.project-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.project-actions {
    display: flex;
    gap: 10px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header h3 {
    color: #333;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.modal-content form {
    padding: 0 25px 25px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Loading */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.loading.active {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .app-main {
        padding: 15px;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .app-nav {
        overflow-x: auto;
        padding: 0 15px;
    }
    
    .nav-btn {
        white-space: nowrap;
        padding: 15px;
    }
    
    .calendar-controls,
    .kanban-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .app-header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .dashboard-header,
    .calendar-header,
    .kanban-header,
    .projects-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
}

