@font-face {
    font-family: 'Zalando Sans';
    src: url('https://cdn.jsdelivr.net/gh/zalando/sans@master/ZalandoSans-Regular.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/zalando/sans@master/ZalandoSans-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Zalando Sans';
    src: url('https://cdn.jsdelivr.net/gh/zalando/sans@master/ZalandoSans-Medium.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/zalando/sans@master/ZalandoSans-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Zalando Sans';
    src: url('https://cdn.jsdelivr.net/gh/zalando/sans@master/ZalandoSans-Bold.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/zalando/sans@master/ZalandoSans-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --primary-color: #39e67f;
    --primary-hover: #2dd16a;
    --secondary-color: #ea4335;
    --background: #1a1a1a;
    --surface: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border: #404040;
    --hover: #3a3a3a;
    --selected-border: #39e67f;
    --selected-bg: #1e3a1e;
    --calendar-cell-bg: #252525;
    --calendar-other-month-bg: #1f1f1f;
    --calendar-other-month-text: #666666;
    --event-blue: #4285f4;
    --event-red: #ea4335;
    --event-yellow: #fbbc04;
    --event-green: #34a853;
    --event-orange: #ff6d01;
    --event-purple: #9c27b0;
    --event-teal: #009688;
    --event-brown: #795548;
}

body {
    font-family: 'Zalando Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #1a2a1a 100%);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#eventModal {
    background: rgba(0, 0, 0, 0.5);
}

#eventModal.active {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#todoModal {
    background: rgba(0, 0, 0, 0.5);
}
#todoModal.active {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--background);
    padding: 32px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.auth-modal {
    background: #1a1a1a;
    border: 1px solid rgba(57, 230, 127, 0.1);
    padding: 40px;
}

.modal-content > h2 {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

/* Auth Header */
.auth-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.auth-logo-icon {
    font-size: 48px;
    color: var(--primary-color);
    line-height: 1;
    display: flex;
    align-items: center;
}

.auth-title {
    font-size: 48px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    font-family: 'Zalando Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1;
}

.modal-large {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.modal-large::-webkit-scrollbar {
    width: 8px;
}

.modal-large::-webkit-scrollbar-track {
    background: transparent;
}

.modal-large::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-large::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

.modal-header h2 {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
}

.btn-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.btn-close:hover {
    background: var(--hover);
    border-radius: 50%;
    color: var(--primary-color);
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.auth-modal .form-group {
    margin-bottom: 24px;
}

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

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

.form-label-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-icon {
    font-size: 20px;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    line-height: 1;
    vertical-align: middle;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="datetime-local"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.auth-modal .form-group input[type="text"],
.auth-modal .form-group input[type="email"],
.auth-modal .form-group input[type="password"] {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-modal .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.4);
}

.auth-modal .form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(57, 230, 127, 0.1);
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.switch-form {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

.switch-form a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.switch-form a:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Botões */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.modal-content .btn {
    width: 100%;
    margin-top: 8px;
}

.modal-content .form-actions .btn {
    width: auto;
    margin-top: 0;
}

.auth-modal .btn {
    margin-top: 0;
}

.btn-primary {
    background: #66fcc6;
    color: #000000;
    box-shadow: 0 2px 8px rgba(102, 252, 198, 0.3);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.form-actions .btn-primary {
    min-width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-primary:hover {
    background: #4de4b3;
    box-shadow: 0 4px 12px rgba(102, 252, 198, 0.4);
    transform: translateY(-1px);
}

.auth-modal .btn-primary {
    margin-top: 8px;
    padding: 14px 24px;
    font-size: 15px;
    border-radius: 6px;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    background: #3a3a3a;
    transition: all 0.2s;
}

.form-actions .btn-secondary {
    min-width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #505050;
    border-color: #505050;
    color: #ffffff;
}

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

.btn-icon:hover {
    background: var(--hover);
    color: var(--primary-color);
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    padding-top: 0;
    border-top: none;
}

.form-actions-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.form-actions-buttons .btn {
    flex: 0 0 auto;
    min-width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

.form-actions.new-event .form-actions-buttons {
    justify-content: center;
}

.btn-delete {
    background: #b34b4b;
    color: #ffffff;
    border: 1px solid #b34b4b;
    min-width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-delete:hover {
    background: #932a2a;
    color: #ffffff;
    border-color: #932a2a;
}

.btn-copy {
    background: #2a8a4a;
    color: #ffffff;
    border: 1px solid #2a8a4a;
    min-width: auto;
    padding: 10px 20px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(42, 138, 74, 0.3);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.btn-copy:hover {
    background: #1f6a38;
    color: #ffffff;
    border-color: #1f6a38;
    box-shadow: 0 4px 12px rgba(42, 138, 74, 0.4);
    transform: translateY(-1px);
}

.btn-complete {
    background: var(--primary-color);
    color: #000000;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(57, 230, 127, 0.3);
    font-weight: 500;
    transition: all 0.2s;
    box-sizing: border-box;
    flex-shrink: 0;
    line-height: 1;
}

.btn-complete .material-icons {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.btn-complete:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(57, 230, 127, 0.4);
    transform: translateY(-1px);
}

.btn-complete.completed {
    background: #2dd16a;
    border-color: #2dd16a;
}

.btn-complete.completed:hover {
    background: #28c05f;
    border-color: #28c05f;
}

/* Layout Principal */
#app {
    display: flex;
    height: 100vh;
    overflow: hidden;
    transition: filter 0.3s ease;
}

#app.blurred {
    filter: blur(4px);
    pointer-events: none;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--background);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 12px;
}

.sidebar-logo-icon {
    font-size: 60px;
    color: var(--primary-color);
    line-height: 1;
    display: flex;
    align-items: center;
}

.btn-menu {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.btn-menu:hover {
    background: var(--hover);
    color: var(--primary-color);
}

.logo {
    font-size: 27.5px;
    font-weight: 400;
    color: var(--text-primary);
}

.sidebar-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.btn-create-event {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: #000000;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-create-event:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
}

.view-selector {
    margin-bottom: 24px;
}

.view-btn {
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.view-btn:hover {
    background: var(--hover);
    border-radius: 12px;
}

.view-btn.active {
    background: rgba(57, 230, 127, 0.15);
    color: var(--primary-color);
    border-radius: 12px;
}

.calendars-list h3 {
    font-size: 22px;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 6px;
}

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

.btn-add-calendar {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-add-calendar:hover {
    background: var(--primary-color);
    color: #000000;
    border-color: var(--primary-hover);
}

.calendar-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 3px;
    transition: all 0.2s;
}

.calendar-item:hover {
    background: var(--hover);
}

.calendar-item:hover .calendar-name {
    color: var(--primary-color);
}

.calendar-toggle {
    cursor: pointer;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    width: 20px;
    height: 20px;
}

.calendar-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid;
    transition: all 0.2s;
    cursor: pointer;
    box-sizing: border-box;
    flex-shrink: 0;
}

.calendar-color.visible {
    opacity: 1;
}

.calendar-color.hidden {
    opacity: 1;
    background-color: transparent !important;
    background: transparent !important;
}

.calendar-toggle:hover .calendar-color {
    transform: scale(1.15);
}

.calendar-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.btn-edit-calendar {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0;
    margin-left: 8px;
}

.calendar-item:hover .btn-edit-calendar {
    opacity: 1;
}

.btn-edit-calendar:hover {
    background: var(--hover);
    color: var(--primary-color);
}

.btn-edit-calendar .material-icons {
    font-size: 16px;
}

/* Select de calendário no modal de eventos */
#eventCalendar {
    width: 100%;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Zalando Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

#eventCalendar:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(57, 230, 127, 0.1);
}

#eventCalendar option {
    background: var(--surface);
    color: var(--text-primary);
    padding: 8px;
}

/* Recorrência de eventos */
.recurrence-options {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

#recurrenceType {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
}

#recurrenceType:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.4);
}

#recurrenceType option {
    background: var(--surface);
    color: var(--text-primary);
    padding: 8px;
}

.days-of-week {
    margin-top: 12px;
}

.days-of-week label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 400;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.days-of-week label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.days-of-week input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.form-group label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

/* Color picker do calendário */
#calendarColorPicker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

#calendarColorPicker .color-option {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

#calendarColorPicker .color-option:hover {
    transform: scale(1.1);
    border-color: var(--text-primary);
}

#calendarColorPicker .color-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(57, 230, 127, 0.3);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
}

.user-info .material-icons {
    color: var(--text-secondary);
}

.btn-logout {
    width: 100%;
    padding: 8px;
    background: #808080;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout:hover {
    background: #cd5757;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
}

/* Conteúdo Principal */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--background);
    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-nav {
    background: none;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: var(--hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Botões de navegação com setas - formato circular */
#prevBtn,
#nextBtn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

/* Botão Hoje - mesmo estilo do botão Criar */
#todayBtn {
    background: var(--primary-color);
    color: #000000;
    border: none;
    border-radius: 24px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    padding: 8px 16px;
}

#todayBtn:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
}

#currentDate {
    font-size: 22px;
    font-weight: 400;
    margin-left: 16px;
    color: var(--text-primary);
}

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

.btn-todo {
    background: var(--primary-color);
    color: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-todo:hover {
    background: var(--primary-hover);
    color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.btn-todo .material-icons {
    font-size: 20px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    transition: all 0.2s;
}

.search-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(57, 230, 127, 0.1);
}

.search-input {
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    flex: 1;
    min-width: 200px;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-container .btn-icon {
    padding: 4px;
    margin: 0;
}

/* Resultados da busca em lista */
.search-results-container {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: auto;
    padding: 24px;
    min-height: 0;
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.search-results-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.search-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    user-select: none;
}

.search-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.search-results-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.search-toolbar-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-right: 8px;
}

.search-results-toolbar .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.search-bulk-calendar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.search-bulk-calendar-select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    min-width: 160px;
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: background 0.2s, border-color 0.2s;
}

.search-result-item-checkbox {
    flex-shrink: 0;
    margin: 2px 0 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.search-result-item-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.search-result-item-content {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-result-item:hover {
    background: var(--background-hover, rgba(57, 230, 127, 0.08));
    border-color: var(--primary-color);
}

.search-result-item-content:focus {
    outline: none;
}

.search-result-item-content:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.search-result-item.completed .search-result-item-title {
    text-decoration: line-through;
    opacity: 0.7;
}

.search-result-item-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.search-result-item-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.search-results-empty {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* To Do List - Modal e lista */
.modal-todo {
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.modal-todo .modal-header {
    flex-shrink: 0;
    gap: 12px;
}
.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.modal-header-actions .todo-filter {
    margin-bottom: 0;
}
.todo-add-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.todo-add-row-title {
    width: 100%;
}
.todo-add-row-title .todo-title-input {
    width: 100%;
    box-sizing: border-box;
}
.todo-add-row-options {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}
.todo-add-row-options .todo-calendar-select {
    flex: 1 1 0;
    min-width: 100px;
    max-width: 180px;
}
.todo-add-row-options .todo-deadline-input {
    flex: 1 1 0;
    min-width: 120px;
    max-width: 180px;
}
.todo-add-row-options .todo-calendar-select,
.todo-add-row-options .todo-deadline-input,
.todo-add-row-options .btn-add-todo {
    height: 40px;
    box-sizing: border-box;
    border-radius: 8px;
}
.todo-add-row-options .btn-add-todo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
}
.todo-title-input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}
.todo-title-input:focus {
    outline: none;
    border-color: var(--primary-color);
}
.todo-calendar-select {
    padding: 0 32px 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b0b0b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: var(--text-primary);
    font-size: 14px;
    min-width: 100px;
    appearance: none;
    -webkit-appearance: none;
}
.todo-deadline-input {
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 120px;
}
.todo-add-form .btn-add-todo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    min-width: auto;
    width: auto;
    height: 40px;
    background: var(--primary-color);
    color: #000000;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(57, 230, 127, 0.3);
}
.todo-add-form .btn-add-todo:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 10px rgba(57, 230, 127, 0.4);
}
.todo-add-form .btn-add-todo .material-icons {
    font-size: 18px;
}
.todo-add-form .btn-cancel-todo-edit {
    display: none;
}
.todo-add-form .btn-cancel-todo-edit[style*="inline-flex"] {
    display: inline-flex;
}
.todo-progress {
    margin-bottom: 20px;
    flex-shrink: 0;
}
.todo-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.todo-progress-label {
    font-size: 13px;
    color: var(--text-secondary);
}
.todo-progress-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-color);
}
.todo-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.todo-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 999px;
    transition: width 0.35s ease;
}
.todo-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.todo-filter-label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}
.todo-filter-select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    min-width: 120px;
    max-width: 160px;
}
.todo-filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}
.todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}
.todo-list-empty {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 24px 0;
    margin: 0;
    text-align: center;
}
.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    margin-bottom: 6px;
    background: var(--hover);
    transition: opacity 0.2s, filter 0.2s;
}
.todo-item:hover {
    opacity: 0.95;
}
.todo-item.completed .todo-item-title {
    text-decoration: line-through;
    opacity: 0.7;
}
.todo-item-checkbox {
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.todo-item-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}
.todo-item-body {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.todo-item-title {
    font-size: 14px;
    color: inherit;
}
.todo-item-meta {
    font-size: 12px;
    opacity: 0.9;
    color: inherit;
}
.todo-item .btn-edit-todo,
.todo-item .btn-delete-todo {
    flex-shrink: 0;
    color: inherit;
    padding: 4px;
    opacity: 0.85;
}
.todo-item .btn-edit-todo:hover,
.todo-item .btn-delete-todo:hover {
    opacity: 1;
}

/* Calendário - Visualização Mensal */
.calendar-container {
    flex: 1;
    overflow: auto;
    background: var(--background);
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#calendarView {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.calendar-month {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    height: 100%;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--background);
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 8px 4px 8px 4px;
    gap: 4px;
}

.weekday {
    padding: 8px 4px;
    text-align: center;
    font-size: 16.5px;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr;
    gap: 4px;
    padding: 4px;
    flex: 1;
    min-height: 0;
}

.calendar-day {
    height: 100%;
    min-height: 0;
    border: none;
    padding: 8px;
    position: relative;
    background: var(--calendar-cell-bg);
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-day.other-month {
    background: var(--calendar-other-month-bg);
    color: var(--calendar-other-month-text);
}

.calendar-day.today {
    background: var(--calendar-cell-bg);
    border: 2px solid #0d6e47;
}

.calendar-day.selected {
    background: var(--calendar-cell-bg);
}

.day-number {
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 4px;
    color: var(--text-primary);
    line-height: 1.2;
}

.calendar-day.other-month .day-number {
    color: var(--calendar-other-month-text);
}

.day-number.today {
    color: var(--text-primary);
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.event-item {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: white;
    font-weight: 500;
    display: inline-block;
    width: 100%;
}

.event-item:hover {
    opacity: 0.9;
}

.event-item.completed {
    opacity: 0.25;
}

.event-item.completed:hover {
    opacity: 0.35;
}

.week-event.completed {
    opacity: 0.25;
}

.week-event.completed:hover {
    opacity: 0.35;
}

/* Calendário - Visualização Semanal */
.calendar-week {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.week-header {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    background: var(--background);
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 4px;
    padding: 4px;
}

.week-header-day {
    padding: 8px;
    text-align: center;
    border: none;
    color: var(--text-primary);
    background: var(--calendar-cell-bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.week-header-day.today {
    background: #39e67f;
    border: none;
}

.week-header-day.today .week-header-day-name,
.week-header-day.today .week-header-day-number {
    color: #000000;
}

.week-header-day-name {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.week-header-day-number {
    font-size: 22px;
    font-weight: 400;
}

.week-header-day-number.today {
    color: var(--text-primary);
}

.week-body {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    flex: 1;
}

.time-column {
    border-right: 1px solid var(--border);
    background: var(--background);
}

.time-slot {
    height: 60px;
    border-bottom: 1px solid var(--border);
    padding: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--background);
}

.week-day-column {
    border-right: 1px solid var(--border);
    position: relative;
    background: var(--background);
}

.hour-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
    pointer-events: none;
    z-index: 1;
}

.week-event {
    position: absolute;
    left: 4px;
    right: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    cursor: pointer;
    overflow: hidden;
    font-weight: 500;
    user-select: none;
    z-index: 2;
    border-bottom: 2px solid #1a1a1a;
}

/* Calendário - Visualização Diária */
.calendar-day-view {
    display: grid;
    grid-template-columns: 60px 1fr;
    height: 100%;
}

.day-time-column {
    border-right: 1px solid var(--border);
    background: var(--background);
}

.day-content {
    position: relative;
    background: var(--background);
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--primary-color);
}

/* Responsivo */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        z-index: 100;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .calendar-day {
        min-height: 0;
        height: 100%;
    }
}

