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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    margin: 0 auto;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 30px;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 99;
}

.header-false {
    width: 100%;
    height: 56px;
}

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

.hamburger {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 350;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #16163a;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 400;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    padding: 20px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}

.side-menu.open {
    transform: translateX(0);
}

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

.menu-title {
    font-weight: bold;
    color: #fff;
    font-size: 1.1em;
}

.menu-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #c0c0e0;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.menu-close:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.menu-list {
    height: calc(100% - 10px - 40px);
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 12px 14px;
    background: transparent;
    border: none;
    color: #c0c0e0;
    text-align: left;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.menu-list li:last-child {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-logout {
    border-radius: 0px 0px 5px 5px;
    padding-top: 14px;
}

.menu-logout:hover {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.login-screen {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    padding: 20px;
}

.login-card {
    width: 380px;
    max-width: 100%;
    background: rgba(22, 22, 58, 0.95);
    border: 1px solid rgba(124, 131, 255, 0.4);
    border-radius: 12px;
    padding: 36px 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    backdrop-filter: blur(12px);
    animation: modal-in 0.3s ease;
}

.login-logo {
    font-size: 3em;
    margin-bottom: 8px;
}

.login-title {
    margin: 0 0 4px;
    font-size: 1.6em;
    color: #fff;
    font-family: 'Edu NSW ACT Foundation', 'Segoe UI', Tahoma, sans-serif;
}

.login-subtitle {
    color: #a0a0c0;
    font-size: 0.9em;
    margin-bottom: 24px;
}

.login-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 22px;
}

.login-tab {
    flex: 1;
    padding: 9px 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #a0a0c0;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
}

.login-tab.active {
    background: #7c83ff;
    color: #fff;
}

.login-form .field {
    text-align: left;
    margin-bottom: 14px;
}

.login-form .field input {
    width: 100%;
    height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1em;
    box-sizing: border-box;
    outline: none;
    transition: border 0.2s;
}

.login-form .field input:focus {
    border-color: #7c83ff;
}

.login-error {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.9em;
    margin-bottom: 14px;
}

.btn-login {
    width: 100%;
    height: 42px;
    margin-top: 6px;
    padding: 0;
    font-size: 1em;
    grid-column: auto;
}

header h1 {
    font-size: 25px;
    color: #fff;
    margin: 0;
    font-family: 'Edu NSW ACT Foundation', 'Segoe UI', Tahoma, sans-serif;
}

.stats-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0;
    margin-bottom: 10px;
}

.stats-bar {
    display: flex;
    width: 100%;
    margin: 0;
    flex-wrap: wrap;
    border-radius: 5px 5px 0px 0px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    gap: 1px;
}

.stats-bar .stat-card:last-child,
.stats-bar .stat-card {
    border: none;
    border-radius: 0;
}

.stat-card {
    flex: 1 1 0;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0px;
    padding: 5px 25px;
    text-align: center;
    min-width: 140px;
    backdrop-filter: blur(10px);
}

.stat-card:first-child {
    border-radius: 5px 0px 0px 0px;
}

.stat-card:last-child {
    border-radius: 0px 5px 0px 0px;
}

.stat-card .number {
    font-size: 22px;
    font-weight: bold;
    color: #7c83ff;
}

.stat-card .label {
    font-size: 14px;
    color: #a0a0c0;
    margin-top: 3px;
}

.stat-card.urgent .number {
    color: #ff6b6b;
}

.stat-card.done .number {
    color: #51cf66;
}

.form-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr;
    gap: 12px;
    padding: 15px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.field label {
    display: block;
    font-size: 0.8em;
    color: #a0a0c0;
    margin-bottom: 5px;
}

.field input,
.field select {
    width: 100%;
    height: 40px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.95em;
    outline: none;
    transition: border 0.2s;
}

.field select {
    padding-right: 34px;
    background-color: rgba(255, 255, 255, 0.08);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a0a0c0' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.field input:focus,
.field select:focus {
    border-color: #7c83ff;
}

.field select option {
    background: #1a1a3e;
    color: #fff;
}

.cs {
    position: relative;
    width: 100%;
    font-size: 0.95em;
}

.cs-trigger {
    width: 100%;
    height: 40px;
    padding: 10px 34px 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a0a0c0' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    color: #fff;
    text-align: left;
    cursor: pointer;
    outline: none;
    transition: border 0.2s, background 0.2s;
    font-family: inherit;
    font-size: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.cs-trigger:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.cs-open .cs-trigger,
.cs-trigger:focus {
    border-color: #7c83ff;
}

.cs-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 9999;
    list-style: none;
    margin: 0;
    padding: 4px;
    background: #1a1a3e;
    border: 1px solid rgba(124, 131, 255, 0.4);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    max-height: 230px;
    overflow-y: auto;
    display: none;
}

.cs-open .cs-menu {
    display: block;
}

.cs-menu li {
    padding: 9px 12px;
    border-radius: 6px;
    color: #c0c0e0;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-menu li:hover,
.cs-menu li.highlight {
    background: rgba(124, 131, 255, 0.18);
    color: #fff;
}

.cs-menu li.selected {
    background: #7c83ff;
    color: #fff;
}

.cs-sort {
    height: 36px;
}

.cs-sort .cs-trigger {
    width: auto;
    height: 36px;
    padding: 8px 26px 8px 8px;
    border: 1px solid transparent;
    border-radius: 5px;
    background-color: transparent;
    background-position: right 6px center;
    color: #a0a0c0;
    font-size: 0.85em;
    opacity: 0.85;
}

.cs-sort .cs-trigger:hover {
    opacity: 1;
}

.cs-sort.cs-open .cs-trigger {
    opacity: 1;
}

.cs-sort .cs-menu {
    min-width: 170px;
    right: auto;
}

.btn-add {
    padding: 0px 15px;
    height: 30px;
    grid-column: 2;
    background: transparent;
    color: #fff;
    border: 1px solid #7c83ff;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;

}

.btn-add-responsive {
    display: none;
    padding: 0px 8px;
}

.btn-add-desktop {
    display: block;
}



.btn-add:hover {
    background: #6a72e0;
}

@media (max-width: 500px) {
    .btn-add-desktop {
        display: none;
    }

    .btn-add-responsive {
        display: block;
    }
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.filter-btn {
    flex: auto;
    padding: 8px 16px;
    border: 1px solid #7c83ff;
    border-radius: 5px;
    background: transparent;
    color: #c0c0e0;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.filter-btn.active {
    background: #7c83ff;
    color: #fff;
    border-color: #7c83ff;
}

.sort-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-icon {
    font-size: 1em;
}

.sort-btn {
    padding: 8px 30px 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.06);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a0a0c0' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    color: #c0c0e0;
    cursor: pointer;
    font-size: 0.85em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.sort-btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.sort-btn option {
    background: #1a1a3e;
    color: #fff;
}

.task-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 15px;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    padding: 15px 20px;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.task-card:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.15);
}

.task-card.completed {
    opacity: 0.5;
    text-decoration: line-through;
}

.task-card.overdue {
    border-color: rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.08);
}

.priority-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority-alta {
    background: #ff6b6b;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
}

.priority-media {
    background: #ffa94d;
    box-shadow: 0 0 8px rgba(255, 169, 77, 0.4);
}

.priority-baja {
    background: #51cf66;
    box-shadow: 0 0 8px rgba(81, 207, 102, 0.4);
}

.task-info {
    min-width: 0;
}

.task-title {
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

.task-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #a0a0c0;
    font-size: 0.8em;
}

.task-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.time-badge {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 600;
    background: rgba(124, 131, 255, 0.2);
    color: #7c83ff;
    white-space: nowrap;
}

.deadline-badge {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}

.deadline-ok {
    background: rgba(81, 207, 102, 0.15);
    color: #51cf66;
}

.deadline-warn {
    background: rgba(255, 169, 77, 0.15);
    color: #ffa94d;
}

.deadline-overdue {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.task-actions {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-done {
    background: rgba(81, 207, 102, 0.2);
    color: #51cf66;
}

.btn-done:hover {
    background: rgba(81, 207, 102, 0.4);
}

.btn-delete {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.btn-delete:hover {
    background: rgba(255, 107, 107, 0.4);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6060a0;
}

.empty-state .icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1.1em;
}

.checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.checkbox:hover {
    border-color: #7c83ff;
}

.checkbox.checked {
    background: #51cf66;
    border-color: #51cf66;
}

.checkbox.checked::after {
    content: "\2713";
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.stats-wrap .progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0;
    margin: 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c83ff, #51cf66);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.weekday-checkboxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    height: 40px;
    gap: 6px;
}

.wkday {
    margin: 0 !important;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100%;
    background: rgba(255, 255, 255, 0.08);
    color: #c0c0e0;
    font-size: 0.95em;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.wkday:hover {
    border-color: #ffa94d;
}

.wkday input {
    display: none;
}

.wkday:has(input:checked) {
    border-color: #ffa94d;
    background: rgba(255, 169, 77, 0.2);
    color: #ffa94d;
    font-weight: 600;
}

.daily-badge {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 600;
    background: rgba(255, 169, 77, 0.2);
    color: #ffa94d;
    white-space: nowrap;
}

.task-card.daily {
    border-left: 3px solid #ffa94d;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    padding: 3px;
}

#view-toggle-btn {
    display: none;
    justify-content: center;
    gap: 4px;
    width: 90%;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    padding: 10px;
}

.views-sort {
    position: relative;
    display: flex;
    align-items: center;
    height: 36px;
    gap: 6px;
    margin: 0 15px 15px;
    border-radius: 5px;
}

.views-sort:hover {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid #7c83ff;
}

.stats-modal .stats-panel {
    padding: 0 16px 16px;
}

.stats-panel .stats-bar {
    flex-wrap: wrap;
}

.stats-panel .progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0px 0px 6px 6px;
    margin: 0;
    overflow: hidden;
}

#menu-stats {
    display: none;
}

@media (max-width: 660px) {
    .view-toggle {
        display: none;
    }

    #view-toggle-btn {
        display: flex;
    }

    .views-sort {
        border: 1px solid #7c83ff;
    }

    .cs-sort {
        position: absolute;
    }

    .cs-sort .cs-trigger {
        padding: 8px 26px 8px 25px;
        width: 100%;
        text-align: center;
    }

    .sort-icon {
        margin-left: calc(50% - 40px);
    }

}

@media (max-width: 705px) {
    .stats-wrap {
        display: none;
    }

    #menu-stats {
        display: block;
    }

    .filters {
        margin-top: 20px;
    }

    .task-card {
        grid-template-columns: 1fr;
    }
}

.view-btn {
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: #a0a0c0;
    cursor: pointer;
    font-size: 0.85em;
    opacity: 0.7;
    transition: all 0.2s;
}

.view-btn:hover {
    opacity: 1;
}

.view-btn.active {
    border-color: #7c83ff;
    opacity: 1;
}

#sort-select {
    padding-left: 0;
}

.calendar-view {
    border-radius: 5px;
    padding: 25px;
    backdrop-filter: blur(10px);
    overflow: auto;
}

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

.calendar-nav .calendar-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: calc(100% - 80px);
    gap: 10px;
}

.cal-month-title {
    font-size: 1.4em;
    color: #fff;
    min-width: 220px;
    text-align: center;
}

.cal-nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    color: #e0e0e0;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #7c83ff;
}

.cal-today-btn {
    padding: 8px 16px;
    border: 1px solid rgba(124, 131, 255, 0.3);
    border-radius: 5px;
    background: rgba(124, 131, 255, 0.15);
    color: #7c83ff;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.cal-today-btn:hover {
    background: rgba(124, 131, 255, 0.3);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    width: 100%;
}

.cal-header {
    padding: 10px;
    text-align: center;
    font-size: 0.8em;
    font-weight: 700;
    color: #a0a0c0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cal-day {
    min-height: 100px;
    max-height: 120px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.cal-day:hover {
    background: rgba(255, 255, 255, 0.06);
}

.cal-day.other-month {
    opacity: 0.3;
}

.cal-day.today {
    border-color: #7c83ff;
    background: rgba(124, 131, 255, 0.1);
}

.cal-day-number {
    font-size: 0.85em;
    font-weight: 600;
    color: #c0c0e0;
    margin-bottom: 6px;
}

.cal-day.today .cal-day-number {
    color: #7c83ff;
    font-size: 1em;
}

.cal-tasks {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    flex: 1;
}

.cal-task {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s;
}

.cal-task:hover {
    filter: brightness(1.3);
}

.cal-task.priority-alta {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.cal-task.priority-media {
    background: rgba(255, 169, 77, 0.3);
    color: #ffa94d;
}

.cal-task.priority-baja {
    background: rgba(81, 207, 102, 0.3);
    color: #51cf66;
}

.cal-task.completed {
    opacity: 0.5;
    text-decoration: line-through;
}

.cal-task.daily::before {
    content: "🕔​ ";
    font-size: 0.9em;
}

.cal-more {
    font-size: 0.65em;
    color: #7c83ff;
    text-align: center;
    padding: 2px;
    cursor: pointer;
}

.cal-more:hover {
    text-decoration: underline;
}

@media (max-width: 400px) {
    .calendar-grid .cal-header {
        font-size: 8px;
        padding: 10px 0px;
    }
}

@media (max-width: 400px) {
    .calendar-nav .calendar-box {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .cal-day {
        min-height: 60px;
        max-height: 80px;
        padding: 4px;
    }

    .cal-task {
        font-size: 0.6em;
        padding: 2px 4px;
    }

    .cal-day-number {
        font-size: 0.7em;
    }

    .cal-month-title {
        font-size: 1.1em;
        min-width: 160px;
    }
}

.weekly-view {
    border-radius: 5px;
    padding: 25px;
    backdrop-filter: blur(10px);
    overflow-x: auto;
}

.weekly-grid {
    display: grid;
    grid-template-columns: 70px repeat(7, 1fr);
    padding-bottom: 10px;
    gap: 1px;
    overflow-x: auto;
}

.weekly-header {
    padding: 10px 5px;
    min-width: 120px;
    text-align: center;
    font-size: 0.8em;
    font-weight: 700;
    color: #a0a0c0;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    cursor: pointer;
}

.weekly-header:first-child {
    min-width: 0;
}

.weekly-header.today {
    color: #7c83ff;
    background: rgba(124, 131, 255, 0.15);
}

.weekly-header .day-date {
    display: block;
    font-size: 1.2em;
    color: #e0e0e0;
    margin-top: 2px;
}

.weekly-header.today .day-date {
    color: #7c83ff;
}

.weekly-time-label {
    padding: 4px 8px;
    font-size: 0.7em;
    color: #808090;
    text-align: right;
    border-right: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 50px;
}

.weekly-cell {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    min-height: 50px;
    padding: 2px;
    position: relative;
    overflow: visible;
    transition: background 0.15s;
}

.weekly-cell:hover {
    background: rgba(255, 255, 255, 0.05);
}

.weekly-cell.hour-8,
.weekly-cell.hour-20 {
    border-top: 2px solid rgba(124, 131, 255, 0.3);
}

.weekly-task {
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: absolute;
    left: 2px;
    right: 2px;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.weekly-task:hover {
    filter: brightness(1.2);
    z-index: 10;
}

.weekly-task.priority-alta {
    background: rgba(255, 107, 107, 0.6);
    color: #fff;
    border-left: 3px solid #ff6b6b;
}

.weekly-task.priority-media {
    background: rgba(255, 169, 77, 0.6);
    color: #fff;
    border-left: 3px solid #ffa94d;
}

.weekly-task.priority-baja {
    background: rgba(81, 207, 102, 0.6);
    color: #fff;
    border-left: 3px solid #51cf66;
}

.weekly-task.completed {
    opacity: 0.5;
    text-decoration: line-through;
}

.weekly-time-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff6b6b;
    z-index: 15;
    pointer-events: none;
}

.weekly-time-indicator::before {
    content: "";
    position: absolute;
    left: -4px;
    top: -4px;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    border-radius: 50%;
}

.task-modal {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: rgba(26, 26, 62, 0.98);
    border: 1px solid rgba(124, 131, 255, 0.4);
    border-radius: 5px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 200;
    backdrop-filter: blur(12px);
    animation: modal-in 0.2s ease;
    overflow: hidden;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.modal-priority {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.modal-title {
    flex: 1;
    font-weight: 600;
    color: #fff;
    font-size: 1em;
    word-break: break-word;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #c0c0e0;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.modal-body {
    padding: 16px;
}

.modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9em;
}

.modal-label {
    color: #a0a0c0;
}

.modal-value {
    color: #fff;
    font-weight: 500;
}

.priority-text-alta {
    color: #ff6b6b;
}

.priority-text-media {
    color: #ffa94d;
}

.priority-text-baja {
    color: #51cf66;
}

.modal-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 8px;
}

.badge {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 300;
    display: flex;
    overflow-y: auto;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.add-modal {
    background: #1a1a3e;
    border: 1px solid rgba(124, 131, 255, 0.4);
    border-radius: 5px;
    width: 100%;
    max-width: 700px;
    margin: auto;
    overflow: visible;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
    animation: modal-in 0.2s ease;
}

.add-modal .modal-header {
    margin-bottom: 16px;
}

.add-modal .modal-header h2 {
    font-size: 1.2em;
    color: #fff;
    margin: 0;
}

.filter-modal {
    max-width: 420px;
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 15px;
}

@media (max-width: 768px) {
    .app-error {
        margin: 10px 30px 0;
        padding: 12px 16px;
        border: 1px solid rgba(255, 107, 107, 0.4);
        border-radius: 8px;
        background: rgba(255, 107, 107, 0.15);
        color: #ff6b6b;
        font-size: 0.9em;
    }
}

.day-view {
    border-radius: 5px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.day-task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.day-task-list .filters {
    justify-content: left;
}

.install-body {
    padding: 16px;
    color: #c0c0e0;
    font-size: 0.95em;
    line-height: 1.6;
}

.install-actions {
    padding: 0 16px 16px;
}

.install-actions .btn-add {
    width: 100%;
}

.settings-body {
    padding: 16px;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.settings-title {
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
}

.settings-desc {
    color: #a0a0c0;
    font-size: 0.85em;
    margin-top: 2px;
}

.settings-notif-btn {
    white-space: nowrap;
}

.settings-section {
    color: #a0a0c0;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 14px;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9em;
}

.settings-item-text {
    color: #fff;
    font-weight: 500;
    min-width: 48px;
}

.settings-item-offsets {
    color: #a0a0c0;
    margin-left: auto;
    text-align: right;
}

.prio-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.prio-dot.alta {
    background: #ff6b6b;
}

.prio-dot.media {
    background: #ffa94d;
}

.prio-dot.baja {
    background: #51cf66;
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 0 10px;
}

.account-input {
    width: 100%;
    height: 40px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.95em;
    outline: none;
    transition: border 0.2s;
    box-sizing: border-box;
}

.account-input:focus {
    border-color: #7c83ff;
}

.account-input::placeholder {
    color: #8888aa;
}

.account-msg {
    font-size: 0.85em;
    padding: 6px 0;
}

.account-msg.ok {
    color: #51cf66;
}

.account-msg.err {
    color: #ff6b6b;
}