 :root {
            --bg: #f8fafc;
            --accent: #ffd300;
            --accent-soft: #fff8e7;
            --text-main: #1e293b;
            --text-muted: #64748b;
            --white: #ffffff;
            --border: #e2e8f0;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        }

        body, html {
            height: 100%;
            margin: 0;
            font-family: 'Inter', sans-serif;
            background-color: var(--bg);
            color: var(--text-main);
            overflow: hidden;
        }

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

        /* --- LISTA DE NOTAS (Izquierda) --- */
        .notes-sidebar {
            width: 300px;
            background: white;
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
        }

        .sidebar-header {
            padding: 20px;
            border-bottom: 1px solid var(--border);
            text-align: center;
        }

        .new-note-btn {
            width: 100%;
            padding: 12px;
            background: var(--accent);
            border: none;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .new-note-btn:hover { transform: scale(1.02); }

        .notes-list {
            flex: 1;
            overflow-y: auto;
        }

        .note-item {
            padding: 15px 20px;
            border-bottom: 1px solid #f1f5f9;
            cursor: pointer;
            transition: background 0.2s;
        }

        .note-item:hover { background: var(--accent-soft); }
        .note-item.active { background: var(--accent-soft); border-left: 4px solid var(--accent); }

        .note-item .note-date { font-size: 11px; color: var(--text-muted); font-weight: bold; }
        .note-item .note-preview { font-size: 14px; font-weight: 600; margin-top: 5px; display: block; }

        /* --- ÁREA DE EDICIÓN (Derecha) --- */
        .editor-area {
            flex: 1;
            background: white;
            display: flex;
            flex-direction: column;
            padding: 40px;
            position: relative;
        }

        /* Efecto de papel con líneas */
        .paper {
            flex: 1;
            background: white;
            background-image: linear-gradient(#e5e7eb 1px, transparent 1px);
            background-size: 100% 2rem;
            line-height: 2rem;
            padding: 0 20px;
            border: none;
            outline: none;
            font-size: 16px;
            color: #334155;
            resize: none;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .editor-header {
            margin-bottom: 20px;
        }

        .note-title-input {
            width: 100%;
            font-size: 28px;
            font-weight: 700;
            border: none;
            outline: none;
            color: var(--text-main);
            margin-bottom: 10px;
        }

        .editor-footer {
            padding-top: 20px;
            display: flex;
            justify-content: flex-end;
            gap: 15px;
        }

        .btn {
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            border: none;
        }

        .btn-save { background: var(--accent); color: var(--text-main); }
        .btn-delete { background: #fee2e2; color: #ef4444; }

        /* Fondo de patitas sutil para el editor */
        .editor-area::before {
            content: "";
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            opacity: 0.03;
            pointer-events: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 10a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm4.5 2a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm-9 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM20 18c-3 0-5-2-5-5 0-1 1-2 2-2s2 1 3 1 1-1 3-1 2 1 2 2c0 3-2 5-5 5z' fill='%23000' /%3E%3C/svg%3E");
        }

        .tabs-folder {
    display: flex;
    margin-bottom: -1px; /* Para que se "pegue" a la lista */
    padding-left: 10px;
}

.tab-item {
    background: #e0e0e0; /* Color de pestaña inactiva */
    border: 1px solid #ccc;
    border-bottom: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    border-radius: 10px 10px 0 0; /* Esquinas superiores redondeadas */
    transition: 0.3s;
    margin-right: 5px;
    font-family: inherit;
}

.tab-item.active {
    background: #FFD700; /* Tu amarillo Amiztli */
    color: #1a1a1a;
    border-color: #FFD700;
    padding-top: 15px; /* Se hace un poquito más alta al estar activa */
    margin-top: -5px;
}

.notes-sidebar-list {
    border-top: 2px solid #FFD700; /* El borde que conecta con la pestaña activa */
    background: white;
    height: 100%;
}