:root {
    --dark-bg: #121826;
    --dark-panel: #1a2236;
    --darker-panel: #151d2e;
    --accent-yellow: #FFD700;
    --accent-yellow-light: #ffde2e;
    --text-white: #ffffff;
    --text-light: #e0e0e0;
    --text-gray: #a0aec0;
    --success: #48bb78;
    --warning: #ecc94b;
    --danger: #e53e3e;
    --info: #4299e1;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark-bg);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--darker-panel);
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 215, 0, 0.1);
    transition: var(--transition);
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    color: var(--dark-bg);
}

.app-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-yellow);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: var(--border-radius);
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--accent-yellow);
}

.nav-item.active {
    background: rgba(255, 215, 0, 0.15);
    color: var(--accent-yellow);
}

.nav-item i {
    margin-right: 12px;
    font-size: 18px;
}

.nav-label {
    font-size: 15px;
    font-weight: 500;
}

.projects-count {
    margin-left: auto;
    background: var(--accent-yellow);
    color: var(--dark-bg);
    font-size: 12px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-white);
}

.page-title span {
    color: var(--accent-yellow);
}

.btn {
    background: var(--accent-yellow);
    color: var(--dark-bg);
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    font-size: 15px;
}

.btn:hover {
    background: var(--accent-yellow-light);
    transform: translateY(-2px);
}

.btn i {
    margin-right: 8px;
}

/* Cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--dark-panel);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.stat-title {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-bottom: 10px;
}

.stat-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    height: 100%;
    background: var(--accent-yellow);
    border-radius: 3px;
}

/* Project List */
.section-title {
    font-size: 22px;
    color: var(--text-white);
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.project-card {
    background: var(--dark-panel);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.2);
}

.project-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 5px;
}

.client-name {
    color: var(--text-gray);
    font-size: 14px;
}

.project-status {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.status-active {
    background: rgba(72, 187, 120, 0.2);
    color: var(--success);
}

.status-completed {
    background: rgba(66, 153, 225, 0.2);
    color: var(--info);
}

.status-pending {
    background: rgba(236, 201, 75, 0.2);
    color: var(--warning);
}

.project-body {
    padding: 20px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    color: var(--text-gray);
    font-size: 12px;
    margin-bottom: 3px;
}

.meta-value {
    font-size: 14px;
    font-weight: 500;
}

.project-progress {
    margin-top: 15px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-text {
    font-size: 14px;
    color: var(--text-light);
}

.progress-percent {
    font-weight: 600;
    color: var(--accent-yellow);
}

.project-tasks {
    margin-top: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.task-item:last-child {
    border-bottom: none;
}

.task-checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    width: 100%;
}

.task-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s;
}

.task-checkbox-container:hover input ~ .checkmark {
    background-color: #ddd;
}

.task-checkbox-container input:checked ~ .checkmark {
    background-color: #2196F3;
    border-color: #2196F3;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.task-checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.task-checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.task-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-light);
}

.task-completed .task-name {
    text-decoration: line-through;
    color: var(--text-gray);
}

.add-task-notes {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
    transition: var(--transition);
}

.add-task-notes:hover {
    color: var(--accent-yellow);
}

.project-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    border: none;
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.action-btn:hover {
    background: var(--accent-yellow);
    color: var(--dark-bg);
}

.action-btn i {
    margin-right: 5px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--dark-panel);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--accent-yellow);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Comments Section */
.comments-section {
    background: var(--dark-panel);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 30px;
    box-shadow: var(--shadow);
}

.comments-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-white);
    display: flex;
    align-items: center;
}

.comments-title i {
    margin-right: 10px;
    color: var(--accent-yellow);
}

.comment-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.comment-item {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-yellow);
    color: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--text-white);
}

.comment-time {
    color: var(--text-gray);
    font-size: 13px;
}

.comment-text {
    color: var(--text-light);
    line-height: 1.5;
}

.comment-form {
    display: flex;
    margin-top: 20px;
}

.comment-input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    resize: none;
    height: 50px;
    transition: var(--transition);
}

.comment-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

.comment-submit {
    background: var(--accent-yellow);
    color: var(--dark-bg);
    border: none;
    border-radius: var(--border-radius);
    width: 50px;
    height: 50px;
    margin-left: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-submit:hover {
    background: var(--accent-yellow-light);
}

/* Page Sections */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

/* Calendar */
.calendar-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.calendar-day {
    background: var(--dark-panel);
    border-radius: var(--border-radius);
    padding: 15px;
    min-height: 120px;
    position: relative;
}

.day-header {
    font-weight: 600;
    color: var(--accent-yellow);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.calendar-event {
    background: rgba(255,215,0,0.1);
    padding: 5px 8px;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 13px;
    cursor: pointer;
}

.calendar-event.start {
    background-color: #4CAF50;
    border-left: 3px solid #2E7D32;
}

.calendar-event.end {
    background-color: #FF9800;
    border-left: 3px solid #EF6C00;
}

/* Charts */
.chart-container {
    background: var(--dark-panel);
    border-radius: var(--border-radius);
    padding: 20px;
    height: 300px;
    margin-top: 20px;
}

/* Settings */
.settings-panel {
    background: var(--dark-panel);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 20px;
}

/* Email Editor */
.email-editor {
    background: var(--dark-panel);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 20px;
}

.template-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.template-card {
    background: var(--darker-panel);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 15px;
    width: 200px;
    cursor: pointer;
    transition: var(--transition);
}

.template-card:hover {
    border-color: var(--accent-yellow);
    transform: translateY(-3px);
}

.template-card.active {
    border-color: var(--accent-yellow);
    background: rgba(255, 215, 0, 0.1);
}

.template-title {
    font-weight: 600;
    color: var(--accent-yellow);
    margin-bottom: 8px;
}

.template-preview {
    font-size: 13px;
    color: var(--text-gray);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.email-form {
    margin-top: 25px;
}

.email-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Date section in project details */
.date-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.date-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.date-label {
    color: var(--text-gray);
    font-size: 14px;
}

.date-value {
    font-weight: 500;
}

/* URL display */
.project-url {
    color: var(--accent-yellow);
    word-break: break-all;
    margin-top: 10px;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    background: var(--dark-panel);
    color: var(--text-white);
    box-shadow: var(--shadow);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        width: 80px;
    }
    .nav-label, .app-name, .projects-count {
        display: none;
    }
    .logo-container {
        justify-content: center;
    }
    .logo {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .calendar-view {
        grid-template-columns: repeat(1, 1fr);
    }
    .template-selector {
        flex-direction: column;
    }
    .template-card {
        width: 100%;
    }
    .project-footer {
        flex-direction: column;
    }
}

@media (max-width: 1200px) {
    .calendar-view {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .calendar-view {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .calendar-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

.status-revision {
    background: rgba(255, 193, 7, 0.2); /* Ámbar */
    color: #FFC107; /* Amarillo oscuro */
}

.status-completed {
    background: rgba(76, 175, 80, 0.2); /* Verde */
    color: #4CAF50; /* Verde oscuro */
}