/* Hero */
.hero-section {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.08;
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 20px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}
.btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}
.btn-primary:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
}

/* Fade-in animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.dashboard > * { animation: fadeInUp 0.4s ease both; }
.dashboard > *:nth-child(1) { animation-delay: 0s; }
.dashboard > *:nth-child(2) { animation-delay: 0.05s; }
.dashboard > *:nth-child(3) { animation-delay: 0.1s; }
.dashboard > *:nth-child(4) { animation-delay: 0.15s; }
.dashboard > *:nth-child(5) { animation-delay: 0.2s; }
.dashboard > *:nth-child(6) { animation-delay: 0.25s; }

/* Tooltips */
[title] { position: relative; cursor: help; }
[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1c2333;
    color: #e6edf3;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    white-space: nowrap;
    border: 1px solid #30363d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 200;
    pointer-events: none;
    font-weight: 400;
    max-width: min(300px, 90vw);
    overflow-wrap: break-word;
}
[title]:hover::before {
    display: none;
}

/* Task Lists */
.task-list, .note-list { list-style: none; }
.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 4px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    border-left: 3px solid var(--border);
    transition: all var(--transition);
}
.task-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border);
}
.task-item.status-pendiente { border-left-color: var(--yellow); }
.task-item.status-proceso { border-left-color: var(--cyan); }
.task-item.status-revision { border-left-color: var(--purple); }
.task-item.status-terminada { border-left-color: var(--green); opacity: 0.7; }
.task-item.status-terminada:hover { opacity: 1; }
.task-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-title {
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
}
.task-title:hover { color: var(--accent); }
.task-actions { display: flex; gap: 6px; }
.task-info small { color: var(--text-muted); font-size: 0.78rem; }

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge.pendiente { background: rgba(210,153,34,0.15); color: var(--yellow); }
.badge.proceso { background: rgba(57,210,192,0.12); color: var(--cyan); }
.badge.revision { background: rgba(188,140,255,0.15); color: var(--purple); }
.badge.terminada { background: rgba(63,185,80,0.12); color: var(--green); }

/* Note List */
.note-item {
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}
.note-item:hover { background: var(--bg-card-hover); }
.note-title { font-weight: 500; color: var(--accent); text-decoration: none; font-size: 0.95rem; }
.note-title:hover { color: var(--accent-hover); }
.note-preview { color: var(--text-secondary); font-size: 0.85rem; margin-top: 4px; }
.note-actions { margin-top: 8px; }

/* Filters */
.filters { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(88,166,255,0.25);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    transition: all var(--transition);
    font-family: inherit;
    line-height: 1.4;
}
.btn:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255,255,255,0.15);
    color: var(--text-primary);
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 0 16px rgba(88,166,255,0.35);
}
.btn-danger {
    background: transparent;
    color: var(--red);
    border-color: rgba(248,81,73,0.35);
}
.btn-danger:hover {
    background: rgba(248,81,73,0.12);
    border-color: var(--red);
    color: var(--red);
}
.btn-small { padding: 4px 12px; font-size: 0.78rem; }
.btn-block { display: block; width: 100%; }

/* Forms */
.form-container { max-width: 600px; margin: 28px auto; }
.form-container h1 { margin-bottom: 24px; font-size: 1.3rem; font-weight: 600; }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all var(--transition);
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88,166,255,0.15);
    background: var(--bg-primary);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    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='%236e7681' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.field-error { color: var(--red); font-size: 0.82rem; margin-top: 4px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; }
.inline-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inline-form label { margin-bottom: 0; text-transform: none; letter-spacing: 0; }

/* Detail */
.detail-container { margin: 28px 0; }
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h1 { font-size: 1.4rem; margin: 0; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.header-actions { display: flex; gap: 8px; }
.detail-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}
.detail-card:hover { border-color: rgba(255,255,255,0.08); }
.detail-row {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.detail-label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.detail-text { color: var(--text-primary); line-height: 1.7; margin-top: 4px; font-size: 0.95rem; }

.complete-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 16px;
    border: 1px solid var(--border);
}
.complete-section h3 { margin-bottom: 14px; color: var(--text-primary); font-size: 1rem; }
.complete-section .form-control { width: auto; }

/* Confirm Delete */
.confirm-delete {
    max-width: 480px;
    margin: 80px auto;
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border);
}
.confirm-delete h1 { margin-bottom: 16px; font-size: 1.3rem; }
.confirm-delete p { margin-bottom: 24px; color: var(--text-secondary); font-size: 0.95rem; }
.confirm-delete form { display: flex; gap: 10px; justify-content: center; }

/* Summary */
.summary-container { margin: 28px 0; }
.summary-header { margin-bottom: 20px; }
.summary-header h2 { font-size: 1.2rem; color: var(--accent); }
.filter-form { margin-bottom: 20px; background: var(--bg-card); padding: 16px 20px; border-radius: var(--radius); border: 1px solid var(--border); }
.filter-form .form-control { width: auto; min-width: 130px; }
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}
.summary-table th, .summary-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.summary-table th {
    background: rgba(255,255,255,0.03);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.summary-table tr:hover td { background: rgba(255,255,255,0.02); }
.summary-table a { color: var(--accent); text-decoration: none; }
.summary-table a:hover { text-decoration: underline; }

/* Notifications */
.notification-list { list-style: none; }
.notif-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 6px;
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.notif-item:hover { border-color: rgba(255,255,255,0.1); }
.notif-item.unread {
    border-left: 3px solid var(--accent);
    background: rgba(88,166,255,0.05);
}
.notif-content span { display: block; font-size: 0.92rem; color: var(--text-primary); }
.notif-content small { color: var(--text-muted); font-size: 0.78rem; }
.notif-actions { flex-shrink: 0; }

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(88,166,255,0.06);
    border-radius: 6px;
    margin-bottom: 6px;
    border: 1px solid rgba(88,166,255,0.12);
}
.notification-item span { color: var(--text-primary); font-size: 0.9rem; }
.notification-item small { color: var(--text-muted); font-size: 0.78rem; }

/* Login */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(88,166,255,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(57,210,192,0.06) 0%, transparent 50%);
}
.login-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-container h1 { text-align: center; margin-bottom: 6px; font-size: 1.5rem; }
.login-container h2 { text-align: center; font-size: 1rem; color: var(--text-secondary); margin-bottom: 28px; font-weight: 400; }
.login-hint { text-align: center; margin-top: 20px; font-size: 0.8rem; color: var(--text-muted); }
.login-hint code { background: var(--bg-input); padding: 2px 8px; border-radius: 4px; font-size: 0.78rem; border: 1px solid var(--border); }

/* Empty state */
.empty { color: var(--text-muted); font-style: italic; padding: 24px 0; text-align: center; font-size: 0.9rem; }

/* Priority */
.priority {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.priority-urgente { color: var(--red); background: rgba(248,81,73,0.15); }
.priority-alta { color: var(--orange); background: rgba(210,153,34,0.15); }
.priority-media { color: var(--yellow); background: rgba(210,153,34,0.1); }
.priority-baja { color: var(--green); background: rgba(63,185,80,0.1); }

/* Tag Cloud */
.tag-cloud { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 0.82rem;
    background: color-mix(in srgb, var(--tag-color, #58a6ff) 15%, transparent);
    color: var(--tag-color, #58a6ff);
    border: 1px solid color-mix(in srgb, var(--tag-color, #58a6ff) 30%, transparent);
    text-decoration: none;
    transition: all var(--transition);
}
.tag:hover {
    background: color-mix(in srgb, var(--tag-color, #58a6ff) 25%, transparent);
    transform: translateY(-1px);
}

/* Task Tags */
.task-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 500;
    border: 1px solid;
}

/* Subtask progress bar */
.subtask-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.68rem;
    color: var(--text-muted);
}
.subtask-progress .progress-track {
    flex: 1;
    max-width: 100px;
    height: 5px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}
.subtask-progress .progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Active filter tags */
.filter-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(88,166,255,0.1);
    border: 1px solid rgba(88,166,255,0.3);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all var(--transition);
}
.filter-tag:hover {
    background: rgba(88,166,255,0.2);
    border-color: var(--accent);
}
.filter-tag .remove {
    font-size: 0.7rem;
    line-height: 1;
    color: var(--text-muted);
}
.filter-tag .remove:hover { color: var(--red); }

/* Tag Filters */
.filter-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 6px 0;
}
.tag-filter {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.78rem;
    color: var(--tag-color, var(--accent));
    border: 1px solid color-mix(in srgb, var(--tag-color, var(--accent)) 30%, transparent);
    background: color-mix(in srgb, var(--tag-color, var(--accent)) 10%, transparent);
    text-decoration: none;
    transition: all var(--transition);
}
.tag-filter:hover, .tag-filter.active {
    background: color-mix(in srgb, var(--tag-color, var(--accent)) 25%, transparent);
    box-shadow: 0 0 8px color-mix(in srgb, var(--tag-color, var(--accent)) 20%, transparent);
}

/* Recurring Badge */
.recurring-badge { color: var(--purple); font-size: 0.78rem; }

/* Search Bar */
.search-bar { margin-bottom: 16px; }
.search-row { display: flex; gap: 8px; }
.search-input { max-width: 350px; }

/* Checkbox Label */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.9rem !important;
    color: var(--text-primary) !important;
}
.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Color Picker */
.color-picker { cursor: pointer; padding: 2px !important; height: 38px; }

/* Files */
.existing-files { margin-top: 10px; }
.file-subtitle { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 6px; }
.file-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 10px; background: rgba(255,255,255,0.03);
    border-radius: 4px; margin-bottom: 4px;
}
.file-item a { color: var(--accent); font-size: 0.88rem; }
.file-item small { color: var(--text-muted); font-size: 0.75rem; }

/* Tag Cards */
.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tag-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 16px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--tag-color, var(--accent));
    transition: all var(--transition);
}
.tag-card:hover { border-color: rgba(255,255,255,0.1); }
.tag-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tag-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.tag-name { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }
.tag-card-actions { display: flex; gap: 6px; }

/* Tag Form */
.tag-form .inline-form { background: transparent; padding: 0; border: none; }

/* Calendar */
.calendar-page { margin: 28px 0; }
.calendar-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.calendar-nav h2 { font-size: 1.2rem; color: var(--text-primary); margin: 0; }
.calendar-jump { display: flex; gap: 8px; margin-bottom: 20px; }
.calendar-jump .form-control { width: auto; }
.calendar-table {
    width: 100%; border-collapse: collapse;
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border); overflow: hidden;
}
.calendar-table th {
    padding: 10px 6px; text-align: center; font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); font-weight: 600;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}
.calendar-table td {
    width: 14.28%; height: 100px; vertical-align: top; padding: 6px;
    border: 1px solid var(--border); font-size: 0.82rem;
    transition: background var(--transition);
}
.calendar-table td:hover { background: rgba(255,255,255,0.03); }
.calendar-table td.other-month { opacity: 0.3; }
.calendar-table td.today { background: rgba(88,166,255,0.08); }
.cal-day-num {
    font-weight: 600; font-size: 0.85rem; margin-bottom: 4px;
    color: var(--text-secondary);
}
.calendar-table td.today .cal-day-num {
    color: var(--accent);
    background: var(--accent);
    color: #fff;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.cal-tasks { display: flex; flex-direction: column; gap: 2px; }
.cal-task {
    display: block; padding: 2px 4px; border-radius: 3px;
    font-size: 0.7rem; color: var(--text-primary); text-decoration: none;
    background: rgba(255,255,255,0.06);
    border-left: 2px solid var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: background var(--transition);
}
.cal-task:hover { background: rgba(255,255,255,0.12); }
.cal-task.priority-urgente { border-left-color: var(--red); background: rgba(248,81,73,0.1); }
.cal-task.priority-alta { border-left-color: var(--orange); background: rgba(210,153,34,0.08); }
.cal-task.priority-media { border-left-color: var(--yellow); background: rgba(210,153,34,0.05); }
.cal-task.priority-baja { border-left-color: var(--green); }
