:root {
    --bg-color: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Glassmorphism Utilities */
.glass-container {
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Buttons */
button {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.client-list {
    list-style: none;
    overflow-y: auto;
    padding: 1rem;
    flex: 1;
}

.client-list::-webkit-scrollbar {
    width: 6px;
}
.client-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.client-item {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--glass-border);
}

.client-item.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

.client-item-name {
    font-weight: 500;
}

.client-item-day {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
}

/* Main Content */
.main-content {
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
}

.icon-placeholder {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.hidden {
    display: none !important;
}

/* Client View */
.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.client-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.client-meta {
    display: flex;
    gap: 1rem;
}

.badge {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge.secondary {
    background: var(--accent);
}

/* Progress Bar */
.progress-bar-container {
    height: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tasks */
.mt-4 { margin-top: 2rem; }

.day-tasks {
    background: rgba(0,0,0,0.1);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.task-item:hover {
    background: rgba(255,255,255,0.05);
}

.task-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
    border-color: var(--accent);
}

.task-item.blocked {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

/* Checkbox Customization */
.task-checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.task-checkbox:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.task-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.task-content {
    flex: 1;
}

/* Modal and Overlays */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop.hidden {
    display: none;
}

.modal {
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

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

.modal h2 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: white;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}
/* --- New Accordion and Utility Styles to append --- */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-muted {
    color: var(--text-muted);
}

.accordion-item {
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    background: rgba(255,255,255,0.02);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 600;
}

.accordion-header:hover {
    background: rgba(255,255,255,0.05);
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease;
    padding: 0 1.5rem;
}

.accordion-item.open .accordion-body {
    max-height: 2000px; /* Suficiente para os dias do mês */
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.accordion-body .task-item {
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.05);
}
