@import url('https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

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

body {
    font-family: "PT Sans", sans-serif;
    background: rgb(76, 76, 76);
}

.container {
    display: flex;
    min-height: 100vh;
}

.logo {
    height: 100px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background-color: rgb(60, 60, 60);
    width: 15%;
    min-width: 250px;
    height: 100vh;
    position: fixed;
    box-shadow: rgba(14, 30, 37, 0.12) 0px 2px 4px 0px, rgba(14, 30, 37, 0.32) 0px 2px 16px 0px;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    cursor: pointer;
    padding: 10px;
}

.sidebar-header h2 {
    float: right;
    position: relative;
    top: 25px;
    font-size: 50px;
    right: 10px;
    text-decoration: none;
    color: white;
}

.sidebar-links {
    list-style: none;
}

.sidebar-links li a {
    display: block;
    text-decoration: none;
    color: rgb(133, 133, 133);
    padding: 50px 0px 40px 50px;
    font-size: 24px;
    position: relative;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-links li a::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background-color: #3d0c61;
    border-radius: 30px 0px 0px 30px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.sidebar-links li a:hover::before,
.sidebar-links li a.active::before {
    width: 100%;
}

.sidebar-links li a:hover,
.sidebar-links li a.active {
    color: white;
    padding-left: 20px;
    margin-left: 30px;
    padding-right: 30px;
}

/* ===== MAIN CONTENT ===== */
.main {
    margin-left: 15%;
    width: 85%;
    min-height: 100vh;
}

.main-header {
    height: 105px;
    background-color: rgb(60, 60, 60);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.search-bar {
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    background-color: #c6c6c6;
    padding: 10px;
    border-radius: 10px;
    width: 400px;
    display: flex;
    align-items: center;
}

.search-bar input {
    border: none;
    background-color: transparent;
    margin-left: 10px;
    font-size: 17px;
    width: 100%;
    outline: none;
    color: #000000;
}

.search-bar i {
    color: rgb(0, 0, 0);
}

.right-bar {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    display: flex;
    gap: 15px;
}

.btn-bar {
    width: 50px;
    height: 50px;
    font-size: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-bar:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.main-content {
    padding: 30px;
}

.filters-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    color: white;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-select {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tasks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding-bottom: 50px;
}

.no-tasks {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: white;
    font-size: 22px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.task-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: #3d0c61;
}

.task-card[data-priority="alta"]::before {
    background-color: #dc3545;
}

.task-card[data-priority="media"]::before {
    background-color: #ffc107;
}

.task-card[data-priority="baja"]::before {
    background-color: #28a745;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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

.task-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.task-date i {
    color: #3d0c61;
}

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

.btn-action {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-edit {
    background-color: #007bff;
    color: white;
}

.btn-edit:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

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

.btn-delete:hover {
    background-color: #c82333;
    transform: scale(1.1);
}

.task-subject {
    font-size: 13px;
    color: #3d0c61;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.task-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.task-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.task-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.description-short {
    margin-bottom: 10px;
}

.btn-see-more {
    background: none;
    border: none;
    color: #3d0c61;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-decoration: underline;
}

.btn-see-more:hover {
    color: #5a0f8f;
}

.btn-add {
    position: fixed;
    bottom: 30px;
    right: 30px;
    height: 60px;
    width: 60px;
    font-size: 25px;
    background-color: #13aa52;
    cursor: pointer;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.btn-add:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transform: scale(1.1) rotate(90deg);
}

.overlay-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2000;
}

.overlay-container.show {
    display: flex;
    opacity: 1;
}

.popup-box {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease-out;
}

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

.popup-box h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.form-container {
    display: flex;
    flex-direction: column;
}

.form-label {
    margin-bottom: 8px;
    margin-top: 5px;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.form-input,
.form2-input {
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    width: 100%;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form2-input:focus {
    outline: none;
    border-color: #3d0c61;
}

.form-box {
    display: flex;
    gap: 15px;
}

.form-caja {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-textarea {
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    width: 100%;
    height: 120px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #3d0c61;
}

.btn-form {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.btn-submit,
.btn-close-popup {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-submit {
    background-color: #28a745;
    color: white;
}

.btn-submit:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-close-popup:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease-out;
}

.modal-header {
    padding: 25px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #333;
    margin: 0;
}

.btn-close-modal {
    width: 40px;
    height: 40px;
    border: none;
    background-color: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

.modal-body {
    padding: 25px;
}

.detail-row {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row strong {
    color: #3d0c61;
    font-size: 14px;
    text-transform: uppercase;
}

.detail-row span,
.detail-description {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: center;
}

.btn-mark-completed {
    padding: 12px 30px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-mark-completed:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.notification {
    position: fixed;
    top: -100px;
    right: 30px;
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 4000;
    transition: top 0.3s ease;
}

.notification.show {
    top: 30px;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification i {
    font-size: 24px;
}

.notification-success i {
    color: #28a745;
}

.notification-error i {
    color: #dc3545;
}

@media (max-width: 1200px) {
    .tasks-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 80px;
        min-width: 80px;
    }
    
    .sidebar-header h2 {
        display: none;
    }
    
    .sidebar-links li a {
        padding: 30px 10px;
        font-size: 20px;
        text-align: center;
    }
    
    .sidebar-links li a:hover,
    .sidebar-links li a.active {
        padding-left: 10px;
        margin-left: 0;
        padding-right: 10px;
    }
    
    .main {
        margin-left: 80px;
        width: calc(100% - 80px);
    }
    
    .tasks-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .search-bar {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .filters-section {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .tasks-container {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        width: 250px;
        left: 15px;
    }
    
    .right-bar {
        right: 15px;
    }
    
    .form-box {
        flex-direction: column;
        gap: 0;
    }
    
    .btn-add {
        bottom: 20px;
        right: 20px;
        height: 55px;
        width: 55px;
    }
}