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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f3;
    color: #1a1a1a;
    font-size: 15px;
    line-height: 1.6;
}

/* Login */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: white;
    border: 1px solid #e0e0dc;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 380px;
}

.login-box h1 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 4px;
}

.login-box .subtitulo {
    color: #888;
    font-size: 14px;
    margin-bottom: 1.5rem;
}

/* Formularios */
label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    margin-top: 1rem;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: white;
}

textarea {
    resize: vertical;
    width: 100%;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #aaa;
}

button[type="submit"],
button {
    margin-top: 1rem;
    padding: 8px 16px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}

button:hover {
    background: #333;
}

/* Botones secundarios */
.btn-secundario {
    background: white;
    color: #1a1a1a;
    border: 1px solid #ddd;
    margin-top: 0;
}

.btn-secundario:hover {
    background: #f0f0ee;
}

.btn-archivar {
    background: white;
    color: #c0392b;
    border: 1px solid #e0c0be;
    margin-top: 0;
}

.btn-archivar:hover {
    background: #f5e8e8;
}

/* Botones solo icono */
.btn-solo-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin-top: 0;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.btn-verde {
    color: #2e7d32;
    border-color: #c8e6c9;
}

.btn-verde:hover {
    background: #f0f7f0;
}

.btn-rojo {
    color: #c0392b;
    border-color: #e0c0be;
}

.btn-rojo:hover {
    background: #f5e8e8;
}

.btn-gris {
    color: #666;
    border-color: #ddd;
}

.btn-gris:hover {
    background: #f0f0ee;
}

/* Error */
.error {
    background: #fdf0ef;
    color: #c0392b;
    border: 1px solid #e0c0be;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    margin-bottom: 1rem;
}

/* Layout general */
.contenedor {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.encabezado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.encabezado h1 {
    font-size: 20px;
    font-weight: 500;
}

.nav {
    display: flex;
    gap: 1rem;
    font-size: 14px;
}

.nav a {
    color: #888;
    text-decoration: none;
}

.nav a:hover {
    color: #1a1a1a;
}

/* Cards */
.card {
    background: white;
    border: 1px solid #e0e0dc;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* Notas */
.nota {
    background: white;
    border: 1px solid #e0e0dc;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.nota.cumplida {
    opacity: 0.6;
}

.nota.archivada {
    background: #fafafa;
    opacity: 0.5;
}

.nota-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #888;
    margin-bottom: 0.75rem;
}

.nota-meta strong {
    color: #1a1a1a;
    font-weight: 500;
}

.nota-contenido {
    font-size: 15px;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.nota-acciones {
    display: flex;
    gap: 6px;
    margin-top: 0.75rem;
}

.form-editar textarea {
    margin-bottom: 0.5rem;
}

/* Badge */
.badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.badge.cumplida {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge.archivada {
    background: #f5f5f3;
    color: #888;
}

/* Historial */
.historial {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0dc;
}

.historial h2 {
    font-size: 16px;
    font-weight: 500;
    color: #888;
    margin-bottom: 1rem;
}

/* Vacío */
.vacio {
    text-align: center;
    color: #aaa;
    font-size: 14px;
    padding: 2rem 0;
}

/* Dashboard */
.dashboard {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.modulos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modulo-card {
    background: white;
    border: 1px solid #e0e0dc;
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 180px;
    transition: border-color 0.15s;
}

.modulo-card:hover {
    border-color: #aaa;
}

.modulo-icono {
    font-size: 24px;
    margin-bottom: 4px;
}

.modulo-nombre {
    font-weight: 500;
    font-size: 15px;
}

.modulo-desc {
    font-size: 13px;
    color: #888;
}

/* Paginación */
.paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    font-size: 14px;
    color: #888;
}

.paginacion a {
    color: #1a1a1a;
    text-decoration: none;
}

.paginacion a:hover {
    text-decoration: underline;
}